mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Yet another feature that was missing in newui
This commit is contained in:
parent
92f0678f2f
commit
d7000ef1a4
2 changed files with 26 additions and 1 deletions
|
@ -36,6 +36,10 @@
|
||||||
#include "Core/HW/atrac3plus.h"
|
#include "Core/HW/atrac3plus.h"
|
||||||
#include "Core/System.h"
|
#include "Core/System.h"
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "Core/Host.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
namespace MainWindow {
|
namespace MainWindow {
|
||||||
enum {
|
enum {
|
||||||
|
@ -388,11 +392,32 @@ void GlobalSettingsScreen::CreateViews() {
|
||||||
// Screenshot functionality is not yet available on non-Windows
|
// Screenshot functionality is not yet available on non-Windows
|
||||||
list->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, gs->T("Screenshots as PNG")));
|
list->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, gs->T("Screenshots as PNG")));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// TODO: Come up with a way to display a keyboard for mobile users,
|
||||||
|
// so until then, this is Windows/Desktop only.
|
||||||
|
#ifdef _WIN32
|
||||||
|
list->Add(new Choice(g->T("Change Nickname")))->OnClick.Handle(this, &GlobalSettingsScreen::OnChangeNickname);
|
||||||
|
#endif
|
||||||
list->Add(new Choice(gs->T("System Language")))->OnClick.Handle(this, &GlobalSettingsScreen::OnLanguage);
|
list->Add(new Choice(gs->T("System Language")))->OnClick.Handle(this, &GlobalSettingsScreen::OnLanguage);
|
||||||
list->Add(new Choice(gs->T("Developer Tools")))->OnClick.Handle(this, &GlobalSettingsScreen::OnDeveloperTools);
|
list->Add(new Choice(gs->T("Developer Tools")))->OnClick.Handle(this, &GlobalSettingsScreen::OnDeveloperTools);
|
||||||
list->Add(new Choice(g->T("Back")))->OnClick.Handle(this, &GlobalSettingsScreen::OnBack);
|
list->Add(new Choice(g->T("Back")))->OnClick.Handle(this, &GlobalSettingsScreen::OnBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UI::EventReturn GlobalSettingsScreen::OnChangeNickname(UI::EventParams &e) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
const size_t name_len = 256;
|
||||||
|
|
||||||
|
char name[name_len];
|
||||||
|
memset(name, 0, sizeof(name));
|
||||||
|
|
||||||
|
if (host->InputBoxGetString("Enter a new PSP nickname", "PPSSPP", name, name_len)) {
|
||||||
|
g_Config.sNickName = name;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return UI::EVENT_DONE;
|
||||||
|
}
|
||||||
|
|
||||||
UI::EventReturn GlobalSettingsScreen::OnFactoryReset(UI::EventParams &e) {
|
UI::EventReturn GlobalSettingsScreen::OnFactoryReset(UI::EventParams &e) {
|
||||||
screenManager()->push(new PluginScreen());
|
screenManager()->push(new PluginScreen());
|
||||||
return UI::EVENT_DONE;
|
return UI::EVENT_DONE;
|
||||||
|
|
|
@ -62,7 +62,7 @@ private:
|
||||||
UI::EventReturn OnFactoryReset(UI::EventParams &e);
|
UI::EventReturn OnFactoryReset(UI::EventParams &e);
|
||||||
UI::EventReturn OnBack(UI::EventParams &e);
|
UI::EventReturn OnBack(UI::EventParams &e);
|
||||||
UI::EventReturn OnDeveloperTools(UI::EventParams &e);
|
UI::EventReturn OnDeveloperTools(UI::EventParams &e);
|
||||||
|
UI::EventReturn OnChangeNickname(UI::EventParams &e);
|
||||||
// Temporaries to convert bools to other kinds of settings
|
// Temporaries to convert bools to other kinds of settings
|
||||||
bool enableReports_;
|
bool enableReports_;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue