From 0b51d74bb22667323d1ad0a9298885daa05e24db Mon Sep 17 00:00:00 2001 From: Nab <22328803+NABN00B@users.noreply.github.com> Date: Sat, 14 Feb 2026 17:40:05 +0000 Subject: [PATCH] Add icon to Create new shortcut option --- UI/GameScreen.cpp | 6 +++--- UI/PauseScreen.cpp | 4 ++-- UI/UIAtlas.cpp | 2 ++ assets/ui_images/svg_sources.txt | 9 +++++++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index aa7aa736f0..fa809f2233 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -437,7 +437,7 @@ void GameScreen::CreateContextMenu(UI::ViewGroup *parent) { // TODO: This is synchronous, bad! if (!inGame_ && g_recentFiles.ContainsFile(gamePath_.ToString())) { - Choice *removeButton = parent->Add(new Choice(ga->T("Remove From Recent"))); + Choice *removeButton = parent->Add(new Choice(ga->T("Remove From Recent"), ImageID("I_UNPIN"))); removeButton->OnClick.Handle(this, &GameScreen::OnRemoveFromRecent); } @@ -447,12 +447,12 @@ void GameScreen::CreateContextMenu(UI::ViewGroup *parent) { } if (info_->pic1.texture) { - Choice *btnSetBackground = parent->Add(new Choice(ga->T("Use background as UI background"))); + Choice *btnSetBackground = parent->Add(new Choice(ga->T("Use background as UI background"), ImageID("I_DISPLAY"))); btnSetBackground->OnClick.Handle(this, &GameScreen::OnSetBackground); } if ((knownFlags_ & GameInfoFlags::PARAM_SFO) && System_GetPropertyBool(SYSPROP_CAN_CREATE_SHORTCUT)) { - parent->Add(new Choice(ga->T("Create Shortcut")))->OnClick.Add([this](UI::EventParams &e) { + parent->Add(new Choice(ga->T("Create Shortcut"), ImageID("I_SHORTCUT")))->OnClick.Add([this](UI::EventParams &e) { GameInfoFlags hasFlags; std::shared_ptr info_ = g_gameInfoCache->GetInfo(NULL, gamePath_, GameInfoFlags::PARAM_SFO, &hasFlags); if (hasFlags & GameInfoFlags::PARAM_SFO) { diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index df50233257..f75cb02aa8 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -607,7 +607,7 @@ void GamePauseScreen::CreateViews() { rightColumnItems->Add(new Choice(pa->T("Game Settings"), ImageID("I_GEAR")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings); auto pa = GetI18NCategory(I18NCat::PAUSE); if (g_Config.HasGameConfig(g_paramSFO.GetValueString("DISC_ID"))) { - Choice *delGameConfig = rightColumnItems->Add(new Choice(pa->T("Delete Game Config"))); + Choice *delGameConfig = rightColumnItems->Add(new Choice(pa->T("Delete Game Config"), ImageID("I_TRASHCAN"))); delGameConfig->OnClick.Handle(this, &GamePauseScreen::OnDeleteConfig); delGameConfig->SetEnabled(!bootPending_); } @@ -709,7 +709,7 @@ void GamePauseScreen::ShowContextMenu(UI::View *menuButton, bool portrait) { using namespace UI; PopupCallbackScreen *contextMenu = new UI::PopupCallbackScreen([this, portrait](UI::ViewGroup *parent) { auto di = GetI18NCategory(I18NCat::DIALOG); - parent->Add(new Choice(di->T("Reset")))->OnClick.Add([this](UI::EventParams &e) { + parent->Add(new Choice(di->T("Reset"), ImageID("I_WARNING")))->OnClick.Add([this](UI::EventParams &e) { std::string confirmMessage = GetConfirmExitMessage(); if (!confirmMessage.empty()) { auto di = GetI18NCategory(I18NCat::DIALOG); diff --git a/UI/UIAtlas.cpp b/UI/UIAtlas.cpp index c47cc8f5a4..6a49f0fa52 100644 --- a/UI/UIAtlas.cpp +++ b/UI/UIAtlas.cpp @@ -108,6 +108,7 @@ static const ImageMeta imageIDs[] = { {"I_WARNING", false}, {"I_TRASHCAN", false}, {"I_PLUS", false}, + {"I_MINUS", false} {"I_ROTATE_LEFT", true}, {"I_ROTATE_RIGHT", true}, {"I_ARROW_LEFT", true}, @@ -180,6 +181,7 @@ static const ImageMeta imageIDs[] = { {"I_UNKNOWN_ISO", false}, {"I_UMD_VIDEO_ISO", false}, {"I_APP", false}, + {"I_SHORTCUT, false"}, }; static std::string PNGNameFromID(std::string_view id) { diff --git a/assets/ui_images/svg_sources.txt b/assets/ui_images/svg_sources.txt index 6a34956285..fb66be502b 100644 --- a/assets/ui_images/svg_sources.txt +++ b/assets/ui_images/svg_sources.txt @@ -1,5 +1,10 @@ -Most of the vectors in images.svg are custom drawn by hrydgard and NABN00B. +Most of the vectors in images.svg are custom drawn by hrydgard and some by NABN00B. Some are derived from public domain SVGs from the following sites: -www.svgrepo.com +https://www.svgrepo.com +https://uxwing.com + +"Flag of Europe" -- Copyright © Council of Europe +See the Conditions of use here: +https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:42012Y0908(01)&qid=1530786690534&from=EN