mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 08:20:32 +00:00
Added the ability to latch specific world's debug frame. Also moved ImGui's internal headers (with required supporting headers) to be public facing so devs have access to ImGui vec math and other luxuries to make their own widgets under the ImGui namespace
This commit is contained in:
parent
ea84ccf468
commit
d0034be488
@ -53,6 +53,12 @@ FImGuiDelegateHandle FImGuiModule::AddWorldImGuiDelegate(const FImGuiDelegate& D
|
|||||||
return { FImGuiDelegatesContainer::Get().OnWorldDebug(ContextIndex).Add(Delegate), EDelegateCategory::Default, ContextIndex };
|
return { FImGuiDelegatesContainer::Get().OnWorldDebug(ContextIndex).Add(Delegate), EDelegateCategory::Default, ContextIndex };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FImGuiDelegateHandle FImGuiModule::AddWorldImGuiDelegate(const UWorld* World, const FImGuiDelegate& Delegate)
|
||||||
|
{
|
||||||
|
const int32 ContextIndex = Utilities::GetWorldContextIndex(World);
|
||||||
|
return { FImGuiDelegatesContainer::Get().OnWorldDebug(ContextIndex).Add(Delegate), EDelegateCategory::Default, ContextIndex };
|
||||||
|
}
|
||||||
|
|
||||||
FImGuiDelegateHandle FImGuiModule::AddMultiContextImGuiDelegate(const FImGuiDelegate& Delegate)
|
FImGuiDelegateHandle FImGuiModule::AddMultiContextImGuiDelegate(const FImGuiDelegate& Delegate)
|
||||||
{
|
{
|
||||||
return { FImGuiDelegatesContainer::Get().OnMultiContextDebug().Add(Delegate), EDelegateCategory::MultiContext };
|
return { FImGuiDelegatesContainer::Get().OnMultiContextDebug().Add(Delegate), EDelegateCategory::MultiContext };
|
||||||
|
@ -57,6 +57,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual FImGuiDelegateHandle AddWorldImGuiDelegate(const FImGuiDelegate& Delegate);
|
virtual FImGuiDelegateHandle AddWorldImGuiDelegate(const FImGuiDelegate& Delegate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a delegate called at the end of a specific world's debug frame to draw debug controls in its ImGui context,
|
||||||
|
* creating that context on demand.
|
||||||
|
*
|
||||||
|
* @param World - A specific world to add the delegate to to
|
||||||
|
* @param Delegate - Delegate that we want to add (@see FImGuiDelegate::Create...)
|
||||||
|
* @returns Returns handle that can be used to remove delegate (@see RemoveImGuiDelegate)
|
||||||
|
*/
|
||||||
|
virtual FImGuiDelegateHandle AddWorldImGuiDelegate(const UWorld* World, const FImGuiDelegate& Delegate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add shared delegate called for each ImGui context at the end of debug frame, after calling context specific
|
* Add shared delegate called for each ImGui context at the end of debug frame, after calling context specific
|
||||||
* delegate. This delegate will be used for any ImGui context, created before or after it is registered.
|
* delegate. This delegate will be used for any ImGui context, created before or after it is registered.
|
||||||
|
Loading…
Reference in New Issue
Block a user