UI cleanup and a crashfix for duplicate back key events

This commit is contained in:
Henrik Rydgård
2013-10-28 16:04:53 +01:00
parent 0471a8c886
commit 787db5812d
10 changed files with 14 additions and 71 deletions
+1 -12
View File
@@ -193,7 +193,7 @@ void ControlMappingScreen::CreateViews() {
leftColumn->Add(new Choice(k->T("Clear All")))->OnClick.Handle(this, &ControlMappingScreen::OnClearMapping);
leftColumn->Add(new Choice(k->T("Default All")))->OnClick.Handle(this, &ControlMappingScreen::OnDefaultMapping);
leftColumn->Add(new Spacer(new LinearLayoutParams(1.0f)));
leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &ControlMappingScreen::OnBack);
leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
/*
ChoiceStrip *mode = leftColumn->Add(new ChoiceStrip(ORIENT_VERTICAL));
mode->AddChoice("Replace");
@@ -223,17 +223,6 @@ void ControlMappingScreen::sendMessage(const char *message, const char *value) {
}
}
UI::EventReturn ControlMappingScreen::OnBack(UI::EventParams &e) {
// If we're in-game, return to the game via DR_CANCEL.
if(PSP_IsInited()) {
screenManager()->finishDialog(this, DR_CANCEL);
} else {
screenManager()->finishDialog(this, DR_OK);
}
return UI::EVENT_DONE;
}
UI::EventReturn ControlMappingScreen::OnClearMapping(UI::EventParams &params) {
KeyMap::g_controllerMap.clear();
RecreateViews();