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))
|
if (UNLIKELY(!Data))
|
||||||
{
|
{
|
||||||
Data = &Contexts.Emplace(Utilities::STANDALONE_GAME_CONTEXT_INDEX, FContextData{ GetWorldContextName(), Utilities::STANDALONE_GAME_CONTEXT_INDEX, DrawMultiContextEvent, FontAtlas });
|
Data = &Contexts.Emplace(Utilities::STANDALONE_GAME_CONTEXT_INDEX, FContextData{ GetWorldContextName(), Utilities::STANDALONE_GAME_CONTEXT_INDEX, OnDrawMultiContext, FontAtlas });
|
||||||
ContextProxyCreatedEvent.Broadcast(Utilities::STANDALONE_GAME_CONTEXT_INDEX, *Data->ContextProxy);
|
OnContextProxyCreated.Broadcast(Utilities::STANDALONE_GAME_CONTEXT_INDEX, *Data->ContextProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return *Data;
|
return *Data;
|
||||||
@ -222,8 +222,8 @@ FImGuiContextManager::FContextData& FImGuiContextManager::GetWorldContextData(co
|
|||||||
#else
|
#else
|
||||||
if (UNLIKELY(!Data))
|
if (UNLIKELY(!Data))
|
||||||
{
|
{
|
||||||
Data = &Contexts.Emplace(Index, FContextData{ GetWorldContextName(World), Index, DrawMultiContextEvent, FontAtlas });
|
Data = &Contexts.Emplace(Index, FContextData{ GetWorldContextName(World), Index, OnDrawMultiContext, FontAtlas });
|
||||||
ContextProxyCreatedEvent.Broadcast(Index, *Data->ContextProxy);
|
OnContextProxyCreated.Broadcast(Index, *Data->ContextProxy);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
class FImGuiModuleSettings;
|
class FImGuiModuleSettings;
|
||||||
|
struct FImGuiDPIScaleInfo;
|
||||||
|
|
||||||
// TODO: It might be useful to broadcast FContextProxyCreatedDelegate to users, to support similar cases to our ImGui
|
// 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.
|
// demo, but we would need to remove from that interface internal classes.
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "SImGuiWidget.h"
|
#include "SImGuiWidget.h"
|
||||||
|
|
||||||
#include "ImGuiModuleManager.h"
|
#include "ImGuiModuleManager.h"
|
||||||
|
#include "ImGuiModuleSettings.h"
|
||||||
|
|
||||||
#include <Widgets/Layout/SConstraintCanvas.h>
|
#include <Widgets/Layout/SConstraintCanvas.h>
|
||||||
#include <Widgets/Layout/SDPIScaler.h>
|
#include <Widgets/Layout/SDPIScaler.h>
|
||||||
@ -76,3 +77,8 @@ SImGuiLayout::~SImGuiLayout()
|
|||||||
}
|
}
|
||||||
|
|
||||||
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
|
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
|
||||||
|
|
||||||
|
void SImGuiLayout::SetDPIScale(const FImGuiDPIScaleInfo& ScaleInfo)
|
||||||
|
{
|
||||||
|
DPIScale = ScaleInfo.GetSlateScale();
|
||||||
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
class FImGuiModuleManager;
|
class FImGuiModuleManager;
|
||||||
class UGameViewportClient;
|
class UGameViewportClient;
|
||||||
|
struct FImGuiDPIScaleInfo;
|
||||||
|
|
||||||
// Layout preset for ImGui Widget.
|
// Layout preset for ImGui Widget.
|
||||||
class SImGuiLayout : public SCompoundWidget
|
class SImGuiLayout : public SCompoundWidget
|
||||||
@ -31,7 +32,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
float GetDPIScale() const { return DPIScale; }
|
float GetDPIScale() const { return DPIScale; }
|
||||||
void SetDPIScale(const FImGuiDPIScaleInfo& ScaleInfo) { DPIScale = ScaleInfo.GetSlateScale(); }
|
void SetDPIScale(const FImGuiDPIScaleInfo& ScaleInfo);
|
||||||
|
|
||||||
FImGuiModuleManager* ModuleManager = nullptr;
|
FImGuiModuleManager* ModuleManager = nullptr;
|
||||||
TWeakObjectPtr<UGameViewportClient> GameViewport;
|
TWeakObjectPtr<UGameViewportClient> GameViewport;
|
||||||
|
Loading…
Reference in New Issue
Block a user