2018-11-24 19:54:01 +00:00
|
|
|
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <IConsoleManager.h>
|
|
|
|
|
|
|
|
|
|
|
|
// Collects and give access to module properties.
|
|
|
|
class FImGuiModuleProperties
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2018-11-25 20:36:55 +00:00
|
|
|
// Check whether input is enabled.
|
2018-11-25 19:11:48 +00:00
|
|
|
bool IsInputEnabled() const { return bInputEnabled; }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
// Enable or disable ImGui input.
|
|
|
|
void SetInputEnabled(bool bEnabled) { bInputEnabled = bEnabled; }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
// Toggle ImGui input.
|
|
|
|
void ToggleInput() { SetInputEnabled(!IsInputEnabled()); }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
|
|
|
// Check whether keyboard navigation is enabled.
|
2018-11-25 19:11:48 +00:00
|
|
|
bool IsKeyboardNavigationEnabled() const { return bKeyboardNavigationEnabled; }
|
|
|
|
|
|
|
|
// Enable or disable keyboard navigation.
|
|
|
|
void SetKeyboardNavigationEnabled(bool bEnabled) { bKeyboardNavigationEnabled = bEnabled; }
|
|
|
|
|
|
|
|
// Toggle keyboard navigation.
|
|
|
|
void ToggleKeyboardNavigation() { SetKeyboardNavigationEnabled(!IsKeyboardNavigationEnabled()); }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
|
|
|
// Check whether gamepad navigation is enabled.
|
2018-11-25 19:11:48 +00:00
|
|
|
bool IsGamepadNavigationEnabled() const { return bGamepadNavigationEnabled; }
|
|
|
|
|
|
|
|
// Enable or disable gamepad navigation.
|
|
|
|
void SetGamepadNavigationEnabled(bool bEnabled) { bGamepadNavigationEnabled = bEnabled; }
|
|
|
|
|
|
|
|
// Toggle gamepad navigation.
|
|
|
|
void ToggleGamepadNavigation() { SetGamepadNavigationEnabled(!IsGamepadNavigationEnabled()); }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
// Check whether ImGui demo is visible.
|
|
|
|
bool ShowDemo() const { return bShowDemo; }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
// Show or hide ImGui demo.
|
|
|
|
void SetShowDemo(bool bShow) { bShowDemo = bShow; }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
// Toggle ImGui demo.
|
|
|
|
void ToggleDemo() { SetShowDemo(!ShowDemo()); }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
bool bInputEnabled = false;
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
bool bKeyboardNavigationEnabled = false;
|
|
|
|
bool bGamepadNavigationEnabled = false;
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
bool bShowDemo = false;
|
2018-11-24 19:54:01 +00:00
|
|
|
};
|