mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 16:30:32 +00:00
35f2d342a0
- Added ImGui Module Manager that that implements module logic and manages other module resources. - Added Texture Manager to manage texture resources and maps them to index that can be passed to ImGui context. - Added Context Proxy that represents and manages a single ImGui context. - Added Slate ImGui Widget to render ImGui output.
35 lines
895 B
C++
35 lines
895 B
C++
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
#include "ImGuiPrivatePCH.h"
|
|
|
|
#include "ImGuiModuleManager.h"
|
|
|
|
#include <IPluginManager.h>
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "FImGuiModule"
|
|
|
|
|
|
static FImGuiModuleManager* ModuleManager = nullptr;
|
|
|
|
void FImGuiModule::StartupModule()
|
|
{
|
|
checkf(!ModuleManager, TEXT("Instance of Module Manager already exists. Instance should be created only during module startup."));
|
|
|
|
// Create module manager that implements modules logic.
|
|
ModuleManager = new FImGuiModuleManager();
|
|
}
|
|
|
|
void FImGuiModule::ShutdownModule()
|
|
{
|
|
checkf(ModuleManager, TEXT("Null Module Manager. Manager instance should be deleted during module shutdown."));
|
|
|
|
// Before we shutdown we need to delete manager that will do all necessary cleanup.
|
|
delete ModuleManager;
|
|
ModuleManager = nullptr;
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|
|
IMPLEMENT_MODULE(FImGuiModule, ImGui)
|