From 662670be6505eeb290e3bba82376ee103e034c35 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 27 May 2021 18:25:33 -0400 Subject: [PATCH] Set initial window size for Layers --- Runtime/ImGuiConsole.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Runtime/ImGuiConsole.cpp b/Runtime/ImGuiConsole.cpp index 70994c918..06fe1e7b3 100644 --- a/Runtime/ImGuiConsole.cpp +++ b/Runtime/ImGuiConsole.cpp @@ -816,6 +816,10 @@ void ImGuiConsole::ShowItemsWindow() { } void ImGuiConsole::ShowLayersWindow() { + // For some reason the window shows up tiny without this + float initialWindowSize = 300.f * ImGui::GetIO().DisplayFramebufferScale.x; + ImGui::SetNextWindowSize(ImVec2{initialWindowSize, initialWindowSize}, ImGuiCond_FirstUseEver); + if (ImGui::Begin("Layers", &m_showLayersWindow)) { for (const auto& world : ListWorlds()) { const auto& layers = dummyWorlds[world.second]->GetWorldLayers();