From 73c263c2b449bb3020d28991bb18105a70fb6c65 Mon Sep 17 00:00:00 2001 From: yohannd1 Date: Thu, 19 Dec 2024 18:23:56 -0300 Subject: [PATCH] closing more popups with esc --- src/gui/exportOptions.cpp | 3 +++ src/gui/sysManager.cpp | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/gui/exportOptions.cpp b/src/gui/exportOptions.cpp index 7b6e699dd..5240dde2a 100644 --- a/src/gui/exportOptions.cpp +++ b/src/gui/exportOptions.cpp @@ -512,4 +512,7 @@ void FurnaceGUI::drawExport() { } break; } + if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { + ImGui::CloseCurrentPopup(); + } } diff --git a/src/gui/sysManager.cpp b/src/gui/sysManager.cpp index f4fe58c95..576307d1e 100644 --- a/src/gui/sysManager.cpp +++ b/src/gui/sysManager.cpp @@ -133,6 +133,9 @@ void FurnaceGUI::drawSysManager() { } ImGui::CloseCurrentPopup(); } + if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { + ImGui::CloseCurrentPopup(); + } ImGui::EndPopup(); } ImGui::SameLine(); @@ -169,6 +172,9 @@ void FurnaceGUI::drawSysManager() { updateROMExportAvail(); ImGui::CloseCurrentPopup(); } + if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { + ImGui::CloseCurrentPopup(); + } ImGui::EndPopup(); } }