Set initial window size for Layers

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

View File

@ -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();