From f0489dac8c95071ec462639d4123ff5e19c7688c Mon Sep 17 00:00:00 2001 From: sum2012 Date: Thu, 22 Aug 2013 13:29:41 +0800 Subject: [PATCH] Add a chinese link Many Chinese people cannot go to offical forum. http://tieba.baidu.com/f?ie=utf-8&kw=ppsspp is best for them --- UI/MiscScreens.cpp | 16 ++++++++++++++-- UI/MiscScreens.h | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 7c3c4cf9ea..7e6b5d3b9d 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -351,8 +351,15 @@ void CreditsScreen::CreateViews() { #ifndef GOLD root_->Add(new Button(g->T("Buy Gold"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport); #endif - root_->Add(new Button(g->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); - root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); + if(g_Config.languageIni == "zh_CN") { + root_->Add(new Button(g->T("PPSSPP Chinese Forum"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnChineseForum); + root_->Add(new Button(g->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); + root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 228, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); + } + else { + root_->Add(new Button(g->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); + root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); + } #ifdef GOLD root_->Add(new ImageView(I_ICONGOLD, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); #else @@ -379,6 +386,11 @@ UI::EventReturn CreditsScreen::OnForums(UI::EventParams &e) { return UI::EVENT_DONE; } +UI::EventReturn CreditsScreen::OnChineseForum(UI::EventParams &e) { + LaunchBrowser("http://tieba.baidu.com/f?ie=utf-8&kw=ppsspp"); + return UI::EVENT_DONE; +} + UI::EventReturn CreditsScreen::OnOK(UI::EventParams &e) { screenManager()->finishDialog(this, DR_OK); return UI::EVENT_DONE; diff --git a/UI/MiscScreens.h b/UI/MiscScreens.h index 1fe589e025..a584410f43 100644 --- a/UI/MiscScreens.h +++ b/UI/MiscScreens.h @@ -103,6 +103,7 @@ private: UI::EventReturn OnSupport(UI::EventParams &e); UI::EventReturn OnPPSSPPOrg(UI::EventParams &e); UI::EventReturn OnForums(UI::EventParams &e); + UI::EventReturn OnChineseForum(UI::EventParams &e); int frames_; };