ImGuiInputMonitor.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #ifdef IMGUI_ENABLED
  10. #include "ImGuiManager.h"
  11. #include "ImGuiBus.h"
  12. #include "LYImGuiUtils/HistogramContainer.h"
  13. #include <AzCore/Component/TickBus.h>
  14. namespace ImGui
  15. {
  16. // basic class to show the state of the AzFramework input system.
  17. // Just dumps all the known devices, whether they're connected or not, and if they have input channels, what the state of those
  18. // channels are.
  19. class ImGuiInputMonitor
  20. {
  21. public:
  22. ImGuiInputMonitor();
  23. virtual ~ImGuiInputMonitor() = default;
  24. // Called from owner
  25. void Initialize();
  26. void Shutdown();
  27. // Draw the ImGui Menu
  28. void ImGuiUpdate();
  29. // Toggle the menu on and off
  30. void ToggleEnabled() { m_enabled = !m_enabled; }
  31. private:
  32. // flag for if the entire Menu enabled / visible
  33. bool m_enabled;
  34. void ImGuiUpdate_DrawMenu();
  35. };
  36. }
  37. #endif // IMGUI_ENABLED