mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 08:20:32 +00:00
Fixed standalone compilation errors after bad refactoring @9d4eb74b.
This commit is contained in:
parent
48be56de64
commit
f8d8704a67
@ -169,8 +169,8 @@ FImGuiContextManager::FContextData& FImGuiContextManager::GetStandaloneWorldCont
|
||||
|
||||
if (UNLIKELY(!Data))
|
||||
{
|
||||
Data = &Contexts.Emplace(Utilities::STANDALONE_GAME_CONTEXT_INDEX, FContextData{ GetWorldContextName(), Utilities::STANDALONE_GAME_CONTEXT_INDEX, DrawMultiContextEvent, FontAtlas });
|
||||
ContextProxyCreatedEvent.Broadcast(Utilities::STANDALONE_GAME_CONTEXT_INDEX, *Data->ContextProxy);
|
||||
Data = &Contexts.Emplace(Utilities::STANDALONE_GAME_CONTEXT_INDEX, FContextData{ GetWorldContextName(), Utilities::STANDALONE_GAME_CONTEXT_INDEX, OnDrawMultiContext, FontAtlas });
|
||||
OnContextProxyCreated.Broadcast(Utilities::STANDALONE_GAME_CONTEXT_INDEX, *Data->ContextProxy);
|
||||
}
|
||||
|
||||
return *Data;
|
||||
@ -222,8 +222,8 @@ FImGuiContextManager::FContextData& FImGuiContextManager::GetWorldContextData(co
|
||||
#else
|
||||
if (UNLIKELY(!Data))
|
||||
{
|
||||
Data = &Contexts.Emplace(Index, FContextData{ GetWorldContextName(World), Index, DrawMultiContextEvent, FontAtlas });
|
||||
ContextProxyCreatedEvent.Broadcast(Index, *Data->ContextProxy);
|
||||
Data = &Contexts.Emplace(Index, FContextData{ GetWorldContextName(World), Index, OnDrawMultiContext, FontAtlas });
|
||||
OnContextProxyCreated.Broadcast(Index, *Data->ContextProxy);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
|
||||
class FImGuiModuleSettings;
|
||||
struct FImGuiDPIScaleInfo;
|
||||
|
||||
// TODO: It might be useful to broadcast FContextProxyCreatedDelegate to users, to support similar cases to our ImGui
|
||||
// demo, but we would need to remove from that interface internal classes.
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "SImGuiWidget.h"
|
||||
|
||||
#include "ImGuiModuleManager.h"
|
||||
#include "ImGuiModuleSettings.h"
|
||||
|
||||
#include <Widgets/Layout/SConstraintCanvas.h>
|
||||
#include <Widgets/Layout/SDPIScaler.h>
|
||||
@ -76,3 +77,8 @@ SImGuiLayout::~SImGuiLayout()
|
||||
}
|
||||
|
||||
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
|
||||
|
||||
void SImGuiLayout::SetDPIScale(const FImGuiDPIScaleInfo& ScaleInfo)
|
||||
{
|
||||
DPIScale = ScaleInfo.GetSlateScale();
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
class FImGuiModuleManager;
|
||||
class UGameViewportClient;
|
||||
struct FImGuiDPIScaleInfo;
|
||||
|
||||
// Layout preset for ImGui Widget.
|
||||
class SImGuiLayout : public SCompoundWidget
|
||||
@ -31,7 +32,7 @@ public:
|
||||
private:
|
||||
|
||||
float GetDPIScale() const { return DPIScale; }
|
||||
void SetDPIScale(const FImGuiDPIScaleInfo& ScaleInfo) { DPIScale = ScaleInfo.GetSlateScale(); }
|
||||
void SetDPIScale(const FImGuiDPIScaleInfo& ScaleInfo);
|
||||
|
||||
FImGuiModuleManager* ModuleManager = nullptr;
|
||||
TWeakObjectPtr<UGameViewportClient> GameViewport;
|
||||
|
Loading…
Reference in New Issue
Block a user