Skip to content

Commit

Permalink
Centralize control mapping to in-game control section #1
Browse files Browse the repository at this point in the history
  • Loading branch information
raven02 committed Jul 29, 2013
1 parent 9108bf4 commit 89b9743
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,10 @@ void GameSettingsScreen::CreateViews() {
tabHolder->AddTab("Controls", controlsSettingsScroll);
controlsSettings->Add(new CheckBox(&g_Config.bShowTouchControls, c->T("OnScreen", "On-Screen Touch Controls")));
controlsSettings->Add(new CheckBox(&g_Config.bShowAnalogStick, c->T("Show Left Analog Stick")));
controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 15, 65, c->T("Button Opacity"), screenManager()));
controlsSettings->Add(new CheckBox(&g_Config.bAccelerometerToAnalogHoriz, c->T("Tilt", "Tilt to Analog (horizontal)")));

controlsSettings->Add(new Choice(gs->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping);
controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 15, 65, c->T("Button Opacity"), screenManager()));

// System
ViewGroup *systemSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
ViewGroup *systemSettings = new LinearLayout(ORIENT_VERTICAL);
Expand Down Expand Up @@ -291,11 +292,10 @@ void GlobalSettingsScreen::CreateViews() {
LinearLayout *list = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)));
list->Add(new ItemHeader("General"));
list->Add(new CheckBox(&g_Config.bNewUI, gs->T("Enable New UI")));
list->Add(new CheckBox(&g_Config.bEnableLogging, gs->T("Enable Logging")));
list->Add(new CheckBox(&enableReports_, gs->T("Enable Error Reporting")));
list->Add(new CheckBox(&g_Config.bEnableLogging, gs->T("Enable Debug Logging")));
list->Add(new CheckBox(&enableReports_, gs->T("Enable Errors Reporting")));
list->Add(new CheckBox(&g_Config.bEnableCheats, gs->T("Enable Cheats")));
list->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, gs->T("Screenshots as PNG")));
list->Add(new Choice(gs->T("Control Mapping")))->OnClick.Handle(this, &GlobalSettingsScreen::OnControlMapping);
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);
Expand All @@ -316,12 +316,11 @@ UI::EventReturn GlobalSettingsScreen::OnDeveloperTools(UI::EventParams &e) {
return UI::EVENT_DONE;
}

UI::EventReturn GlobalSettingsScreen::OnControlMapping(UI::EventParams &e) {
screenManager()->push(new ControlsScreen());
UI::EventReturn GameSettingsScreen::OnControlMapping(UI::EventParams &e) {
screenManager()->push(new KeyMappingScreen());
return UI::EVENT_DONE;
}


UI::EventReturn GlobalSettingsScreen::OnBack(UI::EventParams &e) {
screenManager()->finishDialog(this, DR_OK);
g_Config.sReportHost = enableReports_ ? "report.ppsspp.org" : "";
Expand Down

0 comments on commit 89b9743

Please sign in to comment.