From 50c05022769c550974c296bc43cd0494ababbfd7 Mon Sep 17 00:00:00 2001 From: nat-js Date: Fri, 25 Feb 2022 21:17:34 +0800 Subject: [PATCH] Fix about window pos and size --- scripts/modules/gui/window.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/modules/gui/window.lua b/scripts/modules/gui/window.lua index 403b8c9..6fee0ec 100644 --- a/scripts/modules/gui/window.lua +++ b/scripts/modules/gui/window.lua @@ -33,6 +33,11 @@ local layout = { local function renderAboutWindow() window.m_draw_about = ImGui.Begin(window.m_about_title, window.m_draw_about, ImGuiWindowFlags.NoSavedSettings) if window.m_draw_about then + ImGui.SetWindowPos(dpi.GetDisplayResolution().x / 2 - 300 * dpi.GetScale(), + dpi.GetDisplayResolution().y * 0.1 * dpi.GetScale(), + ImGuiCond.FirstUseEver) + ImGui.SetWindowSize(600 * dpi.GetScale(), + dpi.GetDisplayResolution().y * 0.8, ImGuiCond.FirstUseEver) ImGui.Text(window.m_about_text) end ImGui.End()