UnrealImGui/Source/ImGui/Private/ImGuiDelegates.cpp
Sebastian 867a34e640 Changed interface to register ImGui debug delegates:
- Added new FImGuiDelegates interface for ImGui debug delegates.
- Added FImGuiDelegatesContainer for ImGui delegates.
- Added code preserving delegates during hot-reloading and moving them to a new module.
- Depreciated old FImGuiModule delegates interface and FImGuiDelegateHandle.
- Delegates registered with depreciated interface are redirected and get benefit of being preserved during hot-reloading. This can be controlled with IMGUI_REDIRECT_OBSOLETE_DELEGATES.
- Added IMGUI_WITH_OBSOLETE_DELEGATES allowing to strip depreciated interface from builds.
- Modified context manager and context proxy to work with FImGuiDelegatesContainer.
2019-04-10 20:19:11 +01:00

23 lines
535 B
C++

// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
#include "ImGuiPrivatePCH.h"
#include "ImGuiDelegates.h"
#include "ImGuiDelegatesContainer.h"
FSimpleMulticastDelegate& FImGuiDelegates::OnWorldDebug()
{
return OnWorldDebug(GWorld);
}
FSimpleMulticastDelegate& FImGuiDelegates::OnWorldDebug(UWorld* World)
{
return FImGuiDelegatesContainer::Get().OnWorldDebug(World);
}
FSimpleMulticastDelegate& FImGuiDelegates::OnMultiContextDebug()
{
return FImGuiDelegatesContainer::Get().OnMultiContextDebug();
}