Exit with ESC

This commit is contained in:
YohananDiamond 2023-07-03 17:43:00 -03:00
parent c887362a6f
commit 7efc84592b
2 changed files with 3 additions and 3 deletions

View File

@ -36,8 +36,8 @@
//#define IGFD_KEY_BACKSPACE GLFW_KEY_BACKSPACE
// by ex you can quit the dialog by pressing the key excape
//#define USE_DIALOG_EXIT_WITH_KEY
//#define IGFD_EXIT_KEY GLFW_KEY_ESCAPE
#define USE_DIALOG_EXIT_WITH_KEY
#define IGFD_EXIT_KEY ImGuiKey_Escape
// widget
// filter combobox width

View File

@ -140,7 +140,7 @@ void FurnaceGUI::drawNewSong() {
ImGui::SameLine();
if (ImGui::Button("Cancel")) {
if (ImGui::Button("Cancel") || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
ImGui::CloseCurrentPopup();
}