Set initial window size for Layers

This commit is contained in:
Luke Street 2021-05-27 18:25:33 -04:00
parent 0a0f46ea01
commit 662670be65
1 changed files with 4 additions and 0 deletions

View File

@ -816,6 +816,10 @@ void ImGuiConsole::ShowItemsWindow() {
} }
void ImGuiConsole::ShowLayersWindow() { 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)) { if (ImGui::Begin("Layers", &m_showLayersWindow)) {
for (const auto& world : ListWorlds()) { for (const auto& world : ListWorlds()) {
const auto& layers = dummyWorlds[world.second]->GetWorldLayers(); const auto& layers = dummyWorlds[world.second]->GetWorldLayers();