UnrealImGui/Source/ImGui/Private/ImGuiModuleCommands.h
kkawachi 5e4b7084de Fixed build errors when the plugin is placed in the engine directory. (#19)
Merged 4 commits fixing build errors when compiling this as an engine plugin:
- Changed include directives to use full paths (ex. <ICursor.h> -> <GenericPlatform/ICursor.h>).
- Added categories to FImGuiKeyInfo properties (required for all blueprint exposed types in engine plugins).
- Added explicit configuration of PCHUsage (without that it is assumed to be UseExplicitOrSharedPCHs in engine plugins and UseSharedPCHs in game ones) - amended to work also in the older engine versions.
2019-07-27 18:45:25 +01:00

48 lines
1.4 KiB
C++

// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
#pragma once
#include <HAL/IConsoleManager.h>
struct FImGuiKeyInfo;
class FImGuiModuleProperties;
// Manges ImGui module console commands.
class FImGuiModuleCommands
{
public:
static const TCHAR* const ToggleInput;
static const TCHAR* const ToggleKeyboardNavigation;
static const TCHAR* const ToggleGamepadNavigation;
static const TCHAR* const ToggleKeyboardInputSharing;
static const TCHAR* const ToggleGamepadInputSharing;
static const TCHAR* const ToggleMouseInputSharing;
static const TCHAR* const ToggleDemo;
FImGuiModuleCommands(FImGuiModuleProperties& InProperties);
void SetKeyBinding(const TCHAR* CommandName, const FImGuiKeyInfo& KeyInfo);
private:
void ToggleInputImpl();
void ToggleKeyboardNavigationImpl();
void ToggleGamepadNavigationImpl();
void ToggleKeyboardInputSharingImpl();
void ToggleGamepadInputSharingImpl();
void ToggleMouseInputSharingImpl();
void ToggleDemoImpl();
FImGuiModuleProperties& Properties;
FAutoConsoleCommand ToggleInputCommand;
FAutoConsoleCommand ToggleKeyboardNavigationCommand;
FAutoConsoleCommand ToggleGamepadNavigationCommand;
FAutoConsoleCommand ToggleKeyboardInputSharingCommand;
FAutoConsoleCommand ToggleGamepadInputSharingCommand;
FAutoConsoleCommand ToggleMouseInputSharingCommand;
FAutoConsoleCommand ToggleDemoCommand;
};