UnrealImGui/Source/ImGui/Private/ImGuiModule.cpp
Sebastian 35f2d342a0 Added support for ImGui context update and rendering:
- 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.
2017-03-26 21:32:57 +01:00

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)