Finally fix the model compiler window
This commit is contained in:
parent
660396f2ea
commit
eb9951fc8d
1 changed files with 6 additions and 4 deletions
|
@ -21,6 +21,9 @@
|
||||||
void app_main(prism::engine* engine) {
|
void app_main(prism::engine* engine) {
|
||||||
ModelEditor* editor = (ModelEditor*)engine->get_app();
|
ModelEditor* editor = (ModelEditor*)engine->get_app();
|
||||||
|
|
||||||
|
engine->debug_enabled = false;
|
||||||
|
engine->console_enabled = false;
|
||||||
|
|
||||||
if(utility::contains(engine->command_line_arguments, "--no_ui"))
|
if(utility::contains(engine->command_line_arguments, "--no_ui"))
|
||||||
editor->flags.hide_ui = true;
|
editor->flags.hide_ui = true;
|
||||||
|
|
||||||
|
@ -510,13 +513,12 @@ void ModelEditor::compile_model() {
|
||||||
|
|
||||||
void ModelEditor::drawUI() {
|
void ModelEditor::drawUI() {
|
||||||
|
|
||||||
auto viewport = ImGui::GetWindowViewport();
|
auto viewport = ImGui::GetMainViewport();
|
||||||
|
|
||||||
ImGui::Begin("mcompile", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration);
|
ImGui::Begin("mcompile", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration);
|
||||||
|
|
||||||
|
ImGui::SetWindowPos(viewport->Pos, ImGuiCond_Always);
|
||||||
ImGui::SetWindowPos(viewport->Pos);
|
ImGui::SetWindowSize(viewport->Size, ImGuiCond_Always);
|
||||||
ImGui::SetWindowSize(platform::get_window_size(engine->get_main_window()));
|
|
||||||
|
|
||||||
if(ImGui::Button("Open model to compile...")) {
|
if(ImGui::Button("Open model to compile...")) {
|
||||||
engine->get_imgui().open_dialog(true, [this](std::string path) {
|
engine->get_imgui().open_dialog(true, [this](std::string path) {
|
||||||
|
|
Reference in a new issue