From 69c4def0aa7ed69ff3d04696f2d6f297cc72adf6 Mon Sep 17 00:00:00 2001 From: Arnaud Jamin Date: Tue, 28 Nov 2023 01:45:34 -0500 Subject: [PATCH] CogImgui: Remove debug draw --- .../CogImgui/Private/CogImguiContext.cpp | 22 +++++++------------ .../Source/CogImgui/Public/CogImguiContext.h | 2 -- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Plugins/Cog/Source/CogImgui/Private/CogImguiContext.cpp b/Plugins/Cog/Source/CogImgui/Private/CogImguiContext.cpp index 5acbee3..c00e9ba 100644 --- a/Plugins/Cog/Source/CogImgui/Private/CogImguiContext.cpp +++ b/Plugins/Cog/Source/CogImgui/Private/CogImguiContext.cpp @@ -251,12 +251,18 @@ void FCogImguiContext::BeginFrame(float InDeltaTime) //------------------------------------------------------------------------------------------------------- if (bRefreshDPIScale) { - RefreshDPIScale(); + bRefreshDPIScale = false; + + BuildFont(); + + ImGuiStyle NewStyle = ImGuiStyle(); + ImGui::GetStyle() = MoveTemp(NewStyle); + NewStyle.ScaleAllSizes(DpiScale); } ImGui::NewFrame(); - DrawDebug(); + //DrawDebug(); } //-------------------------------------------------------------------------------------------------------------------------- @@ -624,18 +630,6 @@ void FCogImguiContext::SetDPIScale(float Value) bRefreshDPIScale = true; } -//-------------------------------------------------------------------------------------------------------------------------- -void FCogImguiContext::RefreshDPIScale() -{ - bRefreshDPIScale = false; - - BuildFont(); - - ImGuiStyle NewStyle = ImGuiStyle(); - ImGui::GetStyle() = MoveTemp(NewStyle); - NewStyle.ScaleAllSizes(DpiScale); -} - //-------------------------------------------------------------------------------------------------------------------------- void FCogImguiContext::BuildFont() { diff --git a/Plugins/Cog/Source/CogImgui/Public/CogImguiContext.h b/Plugins/Cog/Source/CogImgui/Public/CogImguiContext.h index 62c6176..c188ead 100644 --- a/Plugins/Cog/Source/CogImgui/Public/CogImguiContext.h +++ b/Plugins/Cog/Source/CogImgui/Public/CogImguiContext.h @@ -57,8 +57,6 @@ private: void TryReleaseGameMouseCapture(); - void RefreshDPIScale(); - void BuildFont(); ULocalPlayer* GetLocalPlayer() const;