2018-11-24 19:54:01 +00:00
|
|
|
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Properties that define state of the ImGui module. */
|
|
|
|
class IMGUI_API FImGuiModuleProperties
|
2018-11-24 19:54:01 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2018-11-26 20:20:53 +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-26 20:20:53 +00:00
|
|
|
/** Enable or disable ImGui input. */
|
2018-11-25 19:11:48 +00:00
|
|
|
void SetInputEnabled(bool bEnabled) { bInputEnabled = bEnabled; }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Toggle ImGui input. */
|
2018-11-25 19:11:48 +00:00
|
|
|
void ToggleInput() { SetInputEnabled(!IsInputEnabled()); }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Check whether keyboard navigation is enabled. */
|
2018-11-25 19:11:48 +00:00
|
|
|
bool IsKeyboardNavigationEnabled() const { return bKeyboardNavigationEnabled; }
|
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Enable or disable keyboard navigation. */
|
2018-11-25 19:11:48 +00:00
|
|
|
void SetKeyboardNavigationEnabled(bool bEnabled) { bKeyboardNavigationEnabled = bEnabled; }
|
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Toggle keyboard navigation. */
|
2018-11-25 19:11:48 +00:00
|
|
|
void ToggleKeyboardNavigation() { SetKeyboardNavigationEnabled(!IsKeyboardNavigationEnabled()); }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Check whether gamepad navigation is enabled. */
|
2018-11-25 19:11:48 +00:00
|
|
|
bool IsGamepadNavigationEnabled() const { return bGamepadNavigationEnabled; }
|
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Enable or disable gamepad navigation. */
|
2018-11-25 19:11:48 +00:00
|
|
|
void SetGamepadNavigationEnabled(bool bEnabled) { bGamepadNavigationEnabled = bEnabled; }
|
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Toggle gamepad navigation. */
|
2018-11-25 19:11:48 +00:00
|
|
|
void ToggleGamepadNavigation() { SetGamepadNavigationEnabled(!IsGamepadNavigationEnabled()); }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-12-02 18:42:28 +00:00
|
|
|
/** Check whether keyboard input is shared with game. */
|
|
|
|
bool IsKeyboardInputShared() const { return bKeyboardInputShared; }
|
|
|
|
|
|
|
|
/** Set whether keyboard input should be shared with game. */
|
|
|
|
void SetKeyboardInputShared(bool bShared) { bKeyboardInputShared = bShared; }
|
|
|
|
|
|
|
|
/** Toggle whether keyboard input should be shared with game. */
|
|
|
|
void ToggleKeyboardInputSharing() { SetKeyboardInputShared(!IsKeyboardInputShared()); }
|
|
|
|
|
|
|
|
/** Check whether gamepad input is shared with game. */
|
|
|
|
bool IsGamepadInputShared() const { return bGamepadInputShared; }
|
|
|
|
|
|
|
|
/** Set whether gamepad input should be shared with game. */
|
|
|
|
void SetGamepadInputShared(bool bShared) { bGamepadInputShared = bShared; }
|
|
|
|
|
|
|
|
/** Toggle whether gamepad input should be shared with game. */
|
|
|
|
void ToggleGamepadInputSharing() { SetGamepadInputShared(!IsGamepadInputShared()); }
|
|
|
|
|
2019-07-08 19:46:28 +00:00
|
|
|
/** Check whether mouse input is shared with game. */
|
|
|
|
bool IsMouseInputShared() const { return bMouseInputShared; }
|
|
|
|
|
|
|
|
/** Set whether mouse input should be shared with game. */
|
|
|
|
void SetMouseInputShared(bool bShared) { bMouseInputShared = bShared; }
|
|
|
|
|
|
|
|
/** Toggle whether mouse input should be shared with game. */
|
|
|
|
void ToggleMouseInputSharing() { SetMouseInputShared(!IsMouseInputShared()); }
|
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Check whether ImGui demo is visible. */
|
2018-11-25 19:11:48 +00:00
|
|
|
bool ShowDemo() const { return bShowDemo; }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Show or hide ImGui demo. */
|
2018-11-25 19:11:48 +00:00
|
|
|
void SetShowDemo(bool bShow) { bShowDemo = bShow; }
|
2018-11-24 19:54:01 +00:00
|
|
|
|
2018-11-26 20:20:53 +00:00
|
|
|
/** Toggle ImGui demo. */
|
2018-11-25 19:11:48 +00:00
|
|
|
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-12-02 18:42:28 +00:00
|
|
|
bool bKeyboardInputShared = false;
|
|
|
|
bool bGamepadInputShared = false;
|
2019-07-08 19:46:28 +00:00
|
|
|
bool bMouseInputShared = false;
|
2018-12-02 18:42:28 +00:00
|
|
|
|
2018-11-25 19:11:48 +00:00
|
|
|
bool bShowDemo = false;
|
2018-11-24 19:54:01 +00:00
|
|
|
};
|