mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-23 16:19:44 +00:00
Yet another feature that was missing in newui
This commit is contained in:
parent
92f0678f2f
commit
d7000ef1a4
@ -36,6 +36,10 @@
|
||||
#include "Core/HW/atrac3plus.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Core/Host.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
namespace MainWindow {
|
||||
enum {
|
||||
@ -388,11 +392,32 @@ void GlobalSettingsScreen::CreateViews() {
|
||||
// Screenshot functionality is not yet available on non-Windows
|
||||
list->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, gs->T("Screenshots as PNG")));
|
||||
#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("Developer Tools")))->OnClick.Handle(this, &GlobalSettingsScreen::OnDeveloperTools);
|
||||
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) {
|
||||
screenManager()->push(new PluginScreen());
|
||||
return UI::EVENT_DONE;
|
||||
|
@ -62,7 +62,7 @@ private:
|
||||
UI::EventReturn OnFactoryReset(UI::EventParams &e);
|
||||
UI::EventReturn OnBack(UI::EventParams &e);
|
||||
UI::EventReturn OnDeveloperTools(UI::EventParams &e);
|
||||
|
||||
UI::EventReturn OnChangeNickname(UI::EventParams &e);
|
||||
// Temporaries to convert bools to other kinds of settings
|
||||
bool enableReports_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user