diff --git a/UI/DeveloperToolsScreen.cpp b/UI/DeveloperToolsScreen.cpp index ce38fbc880..b969531dce 100644 --- a/UI/DeveloperToolsScreen.cpp +++ b/UI/DeveloperToolsScreen.cpp @@ -43,6 +43,7 @@ #include "UI/GameSettingsScreen.h" #include "UI/OnScreenDisplay.h" #include "UI/IconCache.h" +#include "UI/MiscViews.h" #if PPSSPP_PLATFORM(ANDROID) diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index b23058b21d..ff5840c955 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -970,7 +970,7 @@ void GameBrowser::Refresh() { if (!lastText_.empty()) { Add(new Spacer()); - Add(new Choice(lastText_, new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT, Margins(10, 0, 0, 10))))->OnClick.Handle(this, &GameBrowser::LastClick); + Add(new Choice(lastText_, ImageID("I_LINK_OUT"), new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT, Margins(10, 0, 0, 10))))->OnClick.Handle(this, &GameBrowser::LastClick); } } diff --git a/UI/MiscViews.cpp b/UI/MiscViews.cpp index f863592352..1d6fbe8c15 100644 --- a/UI/MiscViews.cpp +++ b/UI/MiscViews.cpp @@ -203,7 +203,12 @@ PaneTitleBar::PaneTitleBar(const Path &gamePath, std::string_view title, const s } if (!settingsCategory.empty()) { - std::string settingsUrl = join("https://www.ppsspp.org/docs/settings/", settingsCategory); + std::string settingsUrl; + if (settingsCategory[0] == '/') { + settingsUrl = join("https://www.ppsspp.org", settingsCategory); + } else { + settingsUrl = join("https://www.ppsspp.org/docs/settings/", settingsCategory); + } Choice *helpButton = Add(new Choice(ImageID("I_INFO"), new LinearLayoutParams())); helpButton->OnClick.Add([settingsUrl](UI::EventParams &) { System_LaunchUrl(LaunchUrlType::BROWSER_URL, settingsUrl); diff --git a/UI/OnScreenDisplay.cpp b/UI/OnScreenDisplay.cpp index b79ae0b949..b95fd55a91 100644 --- a/UI/OnScreenDisplay.cpp +++ b/UI/OnScreenDisplay.cpp @@ -121,6 +121,8 @@ static void MeasureOSDEntry(const UIContext &dc, const OnScreenDisplay::Entry &e static void RenderNotice(UIContext &dc, Bounds bounds, float height1, NoticeLevel level, const std::string &text, const std::string &details, const std::string &iconName, int align, float alpha, OSDMessageFlags flags, float timeVal) { UI::Drawable background = UI::Drawable(colorAlpha(GetNoticeBackgroundColor(level), alpha)); + dc.SetFontStyle(dc.GetTheme().uiFont); + uint32_t foreGround = whiteAlpha(alpha); if (!(flags & OSDMessageFlags::Transparent)) { diff --git a/UI/RetroAchievementScreens.cpp b/UI/RetroAchievementScreens.cpp index a579c85273..022a707759 100644 --- a/UI/RetroAchievementScreens.cpp +++ b/UI/RetroAchievementScreens.cpp @@ -15,6 +15,7 @@ #include "UI/RetroAchievementScreens.h" #include "UI/BackgroundAudio.h" #include "UI/OnScreenDisplay.h" +#include "UI/MiscViews.h" static inline std::string_view DeNull(const char *ptr) { return std::string_view(ptr ? ptr : ""); @@ -290,9 +291,12 @@ void RetroAchievementsSettingsScreen::sendMessage(UIMessage message, const char void RetroAchievementsSettingsScreen::CreateAccountTab(UI::ViewGroup *viewGroup) { auto ac = GetI18NCategory(I18NCat::ACHIEVEMENTS); auto di = GetI18NCategory(I18NCat::DIALOG); + auto sy = GetI18NCategory(I18NCat::SYSTEM); using namespace UI; + viewGroup->Add(new PaneTitleBar(Path(), sy->T("RetroAchievements"), "/docs/reference/retro-achievements/")); + if (!g_Config.bAchievementsEnable) { viewGroup->Add(new NoticeView(NoticeLevel::INFO, ac->T("Achievements are disabled"), "", new LinearLayoutParams(Margins(5)))); } else if (Achievements::IsLoggedIn()) { @@ -356,10 +360,10 @@ void RetroAchievementsSettingsScreen::CreateAccountTab(UI::ViewGroup *viewGroup) viewGroup->Add(new CheckBox(&g_Config.bAchievementsSoundEffects, ac->T("Sound Effects")))->SetEnabledPtr(&g_Config.bAchievementsEnable); viewGroup->Add(new ItemHeader(di->T("Links"))); - viewGroup->Add(new Choice(ac->T("RetroAchievements website")))->OnClick.Add([&](UI::EventParams &) -> void { + viewGroup->Add(new Choice(ac->T("RetroAchievements website"), ImageID("I_LINK_OUT")))->OnClick.Add([&](UI::EventParams &) -> void { System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://www.retroachievements.org/"); }); - viewGroup->Add(new Choice(ac->T("How to use RetroAchievements")))->OnClick.Add([&](UI::EventParams &) -> void { + viewGroup->Add(new Choice(ac->T("How to use RetroAchievements"), ImageID("I_LINK_OUT")))->OnClick.Add([&](UI::EventParams &) -> void { System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://www.ppsspp.org/docs/reference/retro-achievements"); }); } @@ -368,6 +372,8 @@ void RetroAchievementsSettingsScreen::CreateCustomizeTab(UI::ViewGroup *viewGrou auto ac = GetI18NCategory(I18NCat::ACHIEVEMENTS); auto a = GetI18NCategory(I18NCat::AUDIO); + viewGroup->Add(new PaneTitleBar(Path(), ac->T("Customize"), "/docs/reference/retro-achievements/")); + using namespace UI; viewGroup->Add(new ItemHeader(ac->T("Sound Effects"))); if (System_GetPropertyBool(SYSPROP_HAS_FILE_BROWSER)) { @@ -393,9 +399,10 @@ void RetroAchievementsSettingsScreen::CreateCustomizeTab(UI::ViewGroup *viewGrou void RetroAchievementsSettingsScreen::CreateDeveloperToolsTab(UI::ViewGroup *viewGroup) { auto ac = GetI18NCategory(I18NCat::ACHIEVEMENTS); auto di = GetI18NCategory(I18NCat::DIALOG); + auto sy = GetI18NCategory(I18NCat::SYSTEM); using namespace UI; - viewGroup->Add(new ItemHeader(di->T("Settings"))); + viewGroup->Add(new PaneTitleBar(Path(), sy->T("Developer Tools"), "/docs/reference/retro-achievements/")); #ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION viewGroup->Add(new CheckBox(&g_Config.bAchievementsEnableRAIntegration, ac->T("Enable RAIntegration (for achievement development)")))->SetEnabledPtr(&g_Config.bAchievementsEnable); #endif diff --git a/assets/ui_images/images.svg b/assets/ui_images/images.svg index 7453ad8968..5405972a5a 100644 --- a/assets/ui_images/images.svg +++ b/assets/ui_images/images.svg @@ -26,13 +26,13 @@ inkscape:document-units="px" inkscape:zoom="2.8284273" inkscape:cx="130.81475" - inkscape:cy="505.05099" + inkscape:cy="363.62964" inkscape:window-width="3840" inkscape:window-height="2071" inkscape:window-x="-9" inkscape:window-y="-9" inkscape:window-maximized="1" - inkscape:current-layer="g121" + inkscape:current-layer="layer1" showgrid="false" />