From 826c34ecc6c23fd2dee2bcb1aee8b31a9a854154 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 29 Sep 2025 06:00:50 -0500 Subject: [PATCH] close with Esc --- src/gui/newFilePicker.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/newFilePicker.cpp b/src/gui/newFilePicker.cpp index 8e49f9e5b..eaf0ff251 100644 --- a/src/gui/newFilePicker.cpp +++ b/src/gui/newFilePicker.cpp @@ -1323,10 +1323,13 @@ bool FurnaceFilePicker::draw(ImGuiWindowFlags winFlags) { ImGui::CloseCurrentPopup(); } ImGui::SameLine(); - if (ImGui::Button("No")) { + if (ImGui::Button("No") || ImGui::IsKeyPressed(ImGuiKey_Escape)) { ImGui::CloseCurrentPopup(); } ImGui::EndPopup(); + } else if (isModal && !noClose && ImGui::IsKeyPressed(ImGuiKey_Escape)) { + curStatus=FP_STATUS_CLOSED; + isOpen=false; } } if (!isEmbed) {