From 73649a48e68c53664945f67678b23c1b995354ce Mon Sep 17 00:00:00 2001 From: chatlanin Date: Wed, 10 May 2023 22:13:55 +0300 Subject: [PATCH] fix double help dialog --- src/rrr/layers/gui/browser/navigation/navigation.cpp | 1 - src/rrr/layers/gui/dialogs/dialogs.cpp | 11 +++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/rrr/layers/gui/browser/navigation/navigation.cpp b/src/rrr/layers/gui/browser/navigation/navigation.cpp index bd45001..df2c791 100644 --- a/src/rrr/layers/gui/browser/navigation/navigation.cpp +++ b/src/rrr/layers/gui/browser/navigation/navigation.cpp @@ -348,7 +348,6 @@ namespace rrr::layers::gui // помощь if (key.get_keycode() == try_engine::key::F1) { - hack::log()("help"); em->execute(types::event_type::SHOW_HELP_DIALOG, nullptr); freeze = true; } diff --git a/src/rrr/layers/gui/dialogs/dialogs.cpp b/src/rrr/layers/gui/dialogs/dialogs.cpp index de0495e..db34bee 100644 --- a/src/rrr/layers/gui/dialogs/dialogs.cpp +++ b/src/rrr/layers/gui/dialogs/dialogs.cpp @@ -40,8 +40,6 @@ namespace rrr::layers::gui if (help_dialog) draw_help_dialog(); - hack::log()("render dialog"); - END_IMGUI_WIN(); ImGui::PopStyleVar(); @@ -95,7 +93,6 @@ namespace rrr::layers::gui { show = true; help_dialog = true; - hack::log()("SHOW_HELP_DIALOG", show, help_dialog); } break; default: @@ -145,9 +142,6 @@ namespace rrr::layers::gui if (rename_dialog) rename(); } - - if (help_dialog && key.get_keycode() == try_engine::key::F1) - cancel(); } void dialogs::released(system_event& e) @@ -288,7 +282,7 @@ namespace rrr::layers::gui void dialogs::draw_help_dialog() { hack::log()("draw_help_dialog"); - height = try_engine::application::get()->get_window()->height() / 2.5f; + height = try_engine::application::get()->get_window()->height() / 2.4f; TR_PUSH_FONT(MEDIUM, 16); @@ -309,6 +303,7 @@ namespace rrr::layers::gui ImGui::TextUnformatted("Удаление: D"); ImGui::TextUnformatted("Переименование: R"); ImGui::TextUnformatted("Создание: A"); + ImGui::TextUnformatted("Вырезание: x"); ImGui::Separator(); ImGui::TextUnformatted("Перемещение в начало: gg"); @@ -317,7 +312,7 @@ namespace rrr::layers::gui ImGui::TextUnformatted("Быстрое перемещение вниз: K"); ImGui::Separator(); - ImGui::TextUnformatted("Выход из помощи: F1"); + ImGui::TextUnformatted("Выход из диалогов: ESCAPE"); TR_POP_FONT(); }