From a46677e64e102022718fce3c95d2bbdc800c0517 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Thu, 12 Dec 2024 10:17:45 +0100 Subject: [PATCH] ui: add cancel button when inserting a disk Issue #1566 --- core/ui/gui.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/ui/gui.cpp b/core/ui/gui.cpp index 286dc66fa..369d6fae4 100644 --- a/core/ui/gui.cpp +++ b/core/ui/gui.cpp @@ -3248,6 +3248,13 @@ static void gui_display_content() if (iconButton(ICON_FA_GEAR, "Settings")) gui_setState(GuiState::Settings); } + else + { + ImGui::SameLine(ImGui::GetContentRegionMax().x + - ImGui::GetStyle().FramePadding.x * 2.0f - ImGui::CalcTextSize("Cancel").x); + if (ImGui::Button("Cancel")) + gui_setState(GuiState::Commands); + } ImGui::PopStyleVar(); scanner.fetch_game_list();