mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Merge pull request #17692 from hrydgard/achievement-ui-fixes
RetroAchievements UI updates: Merge Account and Settings tabs
This commit is contained in:
commit
78e99f1d93
@ -594,7 +594,7 @@ void identify_and_load_callback(int result, const char *error_message, rc_client
|
||||
}
|
||||
case RC_NO_GAME_LOADED:
|
||||
// The current game does not support achievements.
|
||||
g_OSD.Show(OSDType::MESSAGE_INFO, ac->T("This game has no achievements"), 3.0f);
|
||||
g_OSD.Show(OSDType::MESSAGE_INFO, ac->T("RetroAchievements are not available for this game"), 3.0f);
|
||||
break;
|
||||
default:
|
||||
// Other various errors.
|
||||
|
@ -189,11 +189,12 @@ RetroAchievementsSettingsScreen::~RetroAchievementsSettingsScreen() {}
|
||||
void RetroAchievementsSettingsScreen::CreateTabs() {
|
||||
auto ac = GetI18NCategory(I18NCat::ACHIEVEMENTS);
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
auto sy = GetI18NCategory(I18NCat::SYSTEM);
|
||||
|
||||
using namespace UI;
|
||||
|
||||
CreateAccountTab(AddTab("AchievementsAccount", ac->T("Account")));
|
||||
CreateSettingsTab(AddTab("AchievementsSettings", di->T("Settings")));
|
||||
CreateDeveloperToolsTab(AddTab("AchievementsDeveloperTools", sy->T("Developer Tools")));
|
||||
}
|
||||
|
||||
void RetroAchievementsSettingsScreen::sendMessage(const char *message, const char *value) {
|
||||
@ -255,6 +256,17 @@ void RetroAchievementsSettingsScreen::CreateAccountTab(UI::ViewGroup *viewGroup)
|
||||
});
|
||||
}
|
||||
|
||||
using namespace UI;
|
||||
viewGroup->Add(new ItemHeader(di->T("Settings")));
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsEnable, ac->T("Achievements enabled")))->OnClick.Add([&](UI::EventParams &e) -> UI::EventReturn {
|
||||
Achievements::UpdateSettings();
|
||||
RecreateViews();
|
||||
return UI::EVENT_DONE;
|
||||
});
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsChallengeMode, ac->T("Challenge Mode (no savestates)")))->SetEnabledPtr(&g_Config.bAchievementsEnable);
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsEncoreMode, ac->T("Encore Mode")))->SetEnabledPtr(&g_Config.bAchievementsEnable);
|
||||
// viewGroup->Add(new CheckBox(&g_Config.bAchievementsSoundEffects, ac->T("Sound Effects")))->SetEnabledPtr(&g_Config.bAchievementsEnable); // not yet implemented
|
||||
|
||||
viewGroup->Add(new ItemHeader(di->T("Links")));
|
||||
viewGroup->Add(new Choice(ac->T("RetroAchievements website")))->OnClick.Add([&](UI::EventParams &) -> UI::EventReturn {
|
||||
System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://www.retroachievements.org/");
|
||||
@ -266,25 +278,13 @@ void RetroAchievementsSettingsScreen::CreateAccountTab(UI::ViewGroup *viewGroup)
|
||||
});
|
||||
}
|
||||
|
||||
void RetroAchievementsSettingsScreen::CreateSettingsTab(UI::ViewGroup *viewGroup) {
|
||||
void RetroAchievementsSettingsScreen::CreateDeveloperToolsTab(UI::ViewGroup *viewGroup) {
|
||||
auto ac = GetI18NCategory(I18NCat::ACHIEVEMENTS);
|
||||
|
||||
using namespace UI;
|
||||
viewGroup->Add(new ItemHeader(ac->T("Settings")));
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsEnable, ac->T("Achievements enabled")))->OnClick.Add([&](UI::EventParams &e) -> UI::EventReturn {
|
||||
Achievements::UpdateSettings();
|
||||
RecreateViews();
|
||||
return UI::EVENT_DONE;
|
||||
});
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsChallengeMode, ac->T("Challenge Mode (no savestates)")));
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsEncoreMode, ac->T("Encore Mode")));
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsUnofficial, ac->T("Unofficial achievements")));
|
||||
// viewGroup->Add(new CheckBox(&g_Config.bAchievementsSoundEffects, ac->T("Sound Effects")))->SetEnabledPtr(&g_Config.bAchievementsEnable); // not yet implemented
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsUnofficial, ac->T("Unofficial achievements")))->SetEnabledPtr(&g_Config.bAchievementsEnable);
|
||||
viewGroup->Add(new CheckBox(&g_Config.bAchievementsLogBadMemReads, ac->T("Log bad memory accesses")))->SetEnabledPtr(&g_Config.bAchievementsEnable);
|
||||
|
||||
// TODO: What are these for?
|
||||
// viewGroup->Add(new CheckBox(&g_Config.bAchievementsTestMode, ac->T("Test Mode")));
|
||||
// viewGroup->Add(new CheckBox(&g_Config.bAchievementsUnofficialTestMode, ac->T("Unofficial Test Mode")));
|
||||
}
|
||||
|
||||
void MeasureAchievement(const UIContext &dc, const rc_client_achievement_t *achievement, AchievementRenderStyle style, float *w, float *h) {
|
||||
|
@ -42,7 +42,7 @@ protected:
|
||||
|
||||
private:
|
||||
void CreateAccountTab(UI::ViewGroup *viewGroup);
|
||||
void CreateSettingsTab(UI::ViewGroup *viewGroup);
|
||||
void CreateDeveloperToolsTab(UI::ViewGroup *viewGroup);
|
||||
|
||||
std::string username_;
|
||||
std::string password_;
|
||||
|
@ -50,8 +50,6 @@ Rich Presence = Rich Presence
|
||||
Save state loaded without achievement data = Save state loaded without achievement data
|
||||
Sound Effects = Sound Effects
|
||||
Statistics = Statistics
|
||||
Submitted Score = Submitted Score
|
||||
Submitted Score = Submitted score: %d (Best: %d)\nLeaderboard Position: %d of %d
|
||||
Syncing achievements data... = Syncing achievements data...
|
||||
Test Mode = Test Mode
|
||||
This game has no achievements = This game has no achievements
|
||||
|
@ -1,5 +1,8 @@
|
||||
[Achievements]
|
||||
%d achievements, %d points = %d achievements, %d poäng
|
||||
%1: Leaderboard attempt started = %1: Topplisteförsök startat
|
||||
%1: Leaderboard attempt failed = %1: Topplisteförsök misslyckades
|
||||
%1: Submitting leaderboard score: %2! = %1: Skickar in toppliste-poäng: %2!
|
||||
Account = Inloggning
|
||||
Achievements = Achievements
|
||||
Challenge Mode = Utmanings-läge
|
||||
@ -19,13 +22,11 @@ RetroAchievements website = RetroAchievements website
|
||||
Rich Presence = Visa vad du spelar på websiten
|
||||
Sound Effects = Ljudeffekter
|
||||
Statistics = Statistik
|
||||
Submitted Score = Inskickad poäng
|
||||
Submitted Score = Inskickad poäng: %d (Best: %d)\nLedartabell-plats: %d of %d
|
||||
Syncing achievements data... = Synkar achievementdata...
|
||||
Test Mode = Test-läge
|
||||
This game has no achievements = Detta spel har inga achievements
|
||||
Unlocked achievements = Upplåsta achievements
|
||||
Unofficial = Inofficiell
|
||||
Unofficial achievements = Inofficiella achievements
|
||||
|
||||
[Audio]
|
||||
Alternate speed volume = Volym vid alternativ hastighet
|
||||
|
Loading…
Reference in New Issue
Block a user