From 7b055e40402ecc3a5d5202bff2fe74c7bcf1f7d9 Mon Sep 17 00:00:00 2001 From: benui Date: Tue, 1 Mar 2022 10:40:09 -0800 Subject: [PATCH] Fixes to get compiling with Unreal 5.0 Preview 1 --- Source/ImGui/Private/ImGuiContextProxy.cpp | 4 ++-- Source/ImGui/Private/ImGuiDrawData.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/ImGui/Private/ImGuiContextProxy.cpp b/Source/ImGui/Private/ImGuiContextProxy.cpp index a51d3c7..40b45b7 100644 --- a/Source/ImGui/Private/ImGuiContextProxy.cpp +++ b/Source/ImGui/Private/ImGuiContextProxy.cpp @@ -92,7 +92,7 @@ FImGuiContextProxy::FImGuiContextProxy(const FString& InName, int32 InContextInd // Start with the default canvas size. ResetDisplaySize(); - IO.DisplaySize = { DisplaySize.X, DisplaySize.Y }; + IO.DisplaySize = { (float)DisplaySize.X, (float)DisplaySize.Y }; // Set the initial DPI scale. SetDPIScale(InDPIScale); @@ -211,7 +211,7 @@ void FImGuiContextProxy::BeginFrame(float DeltaTime) ImGuiInterops::CopyInput(IO, InputState); InputState.ClearUpdateState(); - IO.DisplaySize = { DisplaySize.X, DisplaySize.Y }; + IO.DisplaySize = { (float)DisplaySize.X, (float)DisplaySize.Y }; ImGui::NewFrame(); diff --git a/Source/ImGui/Private/ImGuiDrawData.cpp b/Source/ImGui/Private/ImGuiDrawData.cpp index 5597648..ab6c5a9 100644 --- a/Source/ImGui/Private/ImGuiDrawData.cpp +++ b/Source/ImGui/Private/ImGuiDrawData.cpp @@ -29,7 +29,7 @@ void FImGuiDrawList::CopyVertexData(TArray& OutVertexBuffer, const SlateVertex.Position[1] = VertexPosition.Y; SlateVertex.ClipRect = VertexClippingRect; #else - SlateVertex.Position = Transform.TransformPoint(ImGuiInterops::ToVector2D(ImGuiVertex.pos)); + SlateVertex.Position = (FVector2f)Transform.TransformPoint(ImGuiInterops::ToVector2D(ImGuiVertex.pos)); #endif // ENGINE_COMPATIBILITY_LEGACY_CLIPPING_API // Unpack ImU32 color.