Skip to content

Commit

Permalink
Fix quitting shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
schroedtert authored and Ozaq committed Jan 23, 2024
1 parent 7a30439 commit 8bbd7a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jps-ui/src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void Gui::Draw()
should_recenter = true;
}
ImGui::Separator();
static const auto exit_shortcut = to_shortcut(ImGuiMod_Shortcut | ImGuiKey_O);
static const auto exit_shortcut = to_shortcut(ImGuiMod_Shortcut | ImGuiKey_Q);
if(ImGui::MenuItem("Exit", exit_shortcut.c_str())) {
should_exit = true;
}
Expand All @@ -59,6 +59,11 @@ void Gui::Draw()
"ChooseFileDlgKey", "Choose File", ".wkt", ".", 1, nullptr, ImGuiFileDialogFlags_Modal);
}

if(ImGui::IsKeyChordPressed(ImGuiMod_Shortcut | ImGuiKey_Q)) {
should_exit = true;
}


if(ImGui::IsKeyChordPressed(ImGuiKey_C)) {
should_recenter = true;
}
Expand Down

0 comments on commit 8bbd7a2

Please sign in to comment.