UnrealImGui/Source/ImGui/Private/ImGuiModuleCommands.h
Sebastian c5f3759664 Moved console variables and commands to wrapper objects:
- Moved property variables to ImGui Module Properties.
- Moved console command to ImGui Module Commands (one for now but more will be added).
- ImGui Module Commands is created by ImGui Module Manager, what means that commands are registered after module is loaded and unregistered when it is unloaded.
- Updated settings to allow more convenient use: Added global pointer to default object and event raised when it is loaded.
2018-11-24 19:54:01 +00:00

36 lines
863 B
C++

// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
#pragma once
#include <IConsoleManager.h>
// Wrapper for ImGui console commands.
class FImGuiModuleCommands
{
// Allow module manager to control life-cycle of this class.
friend class FImGuiModuleManager;
FImGuiModuleCommands();
~FImGuiModuleCommands();
// Disable copy semantics.
FImGuiModuleCommands(const FImGuiModuleCommands&) = default;
FImGuiModuleCommands& operator=(const FImGuiModuleCommands&) = default;
// Disable move semantics.
FImGuiModuleCommands(FImGuiModuleCommands&&) = default;
FImGuiModuleCommands& operator=(FImGuiModuleCommands&&) = default;
void InitializeSettings();
void RegisterSettingsDelegates();
void UnregisterSettingsDelegates();
void UpdateToggleInputKeyBinding();
void ToggleInput();
FAutoConsoleCommand ToggleInputCommand;
};