Skip to content

Commit

Permalink
Fix quitting shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
schroedtert committed Jan 16, 2024
1 parent 6325e3c commit 13d6cf7
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 13d6cf7

Please sign in to comment.