From 5572f3aef433a51fdf7038ac792433bc4ebb695e Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 1 Feb 2022 19:32:59 +0000 Subject: [PATCH] Fix up model compiler appearance --- tools/modelcompiler/src/modeleditor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/modelcompiler/src/modeleditor.cpp b/tools/modelcompiler/src/modeleditor.cpp index 61dca17..8f4d91e 100755 --- a/tools/modelcompiler/src/modeleditor.cpp +++ b/tools/modelcompiler/src/modeleditor.cpp @@ -486,9 +486,13 @@ void ModelEditor::compile_model() { } void ModelEditor::drawUI() { - ImGui::Begin("mcompile", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground); - ImGui::SetWindowPos(ImVec2(0, 0)); + auto viewport = ImGui::GetWindowViewport(); + + ImGui::Begin("mcompile", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration); + + + ImGui::SetWindowPos(viewport->Pos); ImGui::SetWindowSize(platform::get_window_size(engine->get_main_window())); if(ImGui::Button("Open model to compile...")) {