clear status popup with space
This commit is contained in:
@@ -274,6 +274,10 @@ void MasterEditor::ManageKeyboardShortcuts() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui::IsKeyDown(ImGuiKey_F1)) {
|
||||||
|
about_ = true;
|
||||||
|
}
|
||||||
|
|
||||||
// If CMD + Q is pressed, quit the application
|
// If CMD + Q is pressed, quit the application
|
||||||
if (ImGui::IsKeyDown(ImGuiKey_Q) &&
|
if (ImGui::IsKeyDown(ImGuiKey_Q) &&
|
||||||
(ImGui::GetIO().KeyCtrl || ImGui::GetIO().KeySuper)) {
|
(ImGui::GetIO().KeyCtrl || ImGui::GetIO().KeySuper)) {
|
||||||
@@ -352,7 +356,8 @@ void MasterEditor::DrawStatusPopup() {
|
|||||||
Separator();
|
Separator();
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
SameLine(128);
|
SameLine(128);
|
||||||
if (ImGui::Button("OK", gui::kDefaultModalSize)) {
|
if (ImGui::Button("OK", gui::kDefaultModalSize) ||
|
||||||
|
ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Space))) {
|
||||||
show_status_ = false;
|
show_status_ = false;
|
||||||
status_ = absl::OkStatus();
|
status_ = absl::OkStatus();
|
||||||
}
|
}
|
||||||
@@ -389,7 +394,8 @@ void MasterEditor::DrawInfoPopup() {
|
|||||||
Text("Title: %s", rom()->title());
|
Text("Title: %s", rom()->title());
|
||||||
Text("ROM Size: %ld", rom()->size());
|
Text("ROM Size: %ld", rom()->size());
|
||||||
|
|
||||||
if (ImGui::Button("Close", gui::kDefaultModalSize)) {
|
if (ImGui::Button("Close", gui::kDefaultModalSize) ||
|
||||||
|
ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Space))) {
|
||||||
rom_info_ = false;
|
rom_info_ = false;
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
}
|
}
|
||||||
@@ -731,7 +737,7 @@ void MasterEditor::DrawHelpMenu() {
|
|||||||
if (MenuItem("Supported Features")) open_supported_features = true;
|
if (MenuItem("Supported Features")) open_supported_features = true;
|
||||||
if (MenuItem("How to manage a project")) open_manage_project = true;
|
if (MenuItem("How to manage a project")) open_manage_project = true;
|
||||||
|
|
||||||
if (MenuItem("About")) about_ = true;
|
if (MenuItem("About", "F1")) about_ = true;
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user