mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 13:06:24 +02:00
Undo last save
This commit is contained in:
1 parent
af3ad2ca03
commit
b643d60f72
6 files changed
+37
-1
No files matched your search
+12
-1
@@ -392,9 +392,13 @@ void GamePauseScreen::CreateViews() {
|
||||
|
||||
LinearLayout *buttonRow = leftColumnItems->Add(new LinearLayout(ORIENT_HORIZONTAL));
|
||||
if (g_Config.bEnableStateUndo) {
|
||||
UI::Choice *loadUndoButton = buttonRow->Add(new Choice(pa->T("Undo last state load")));
|
||||
UI::Choice *loadUndoButton = buttonRow->Add(new Choice(pa->T("Undo last load")));
|
||||
loadUndoButton->SetEnabled(SaveState::HasUndoLoad(gamePath_));
|
||||
loadUndoButton->OnClick.Handle(this, &GamePauseScreen::OnLoadUndo);
|
||||
|
||||
UI::Choice *saveUndoButton = buttonRow->Add(new Choice(pa->T("Undo last save")));
|
||||
saveUndoButton->SetEnabled(SaveState::HasUndoLastSave(gamePath_));
|
||||
saveUndoButton->OnClick.Handle(this, &GamePauseScreen::OnLastSaveUndo);
|
||||
}
|
||||
|
||||
if (g_Config.iRewindFlipFrequency > 0) {
|
||||
@@ -506,6 +510,13 @@ UI::EventReturn GamePauseScreen::OnLoadUndo(UI::EventParams &e) {
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn GamePauseScreen::OnLastSaveUndo(UI::EventParams &e) {
|
||||
SaveState::UndoLastSave(gamePath_);
|
||||
|
||||
RecreateViews();
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn GamePauseScreen::OnCwCheat(UI::EventParams &e) {
|
||||
screenManager()->push(new CwCheatScreen(gamePath_));
|
||||
return UI::EVENT_DONE;
|
||||
|
||||
Reference in new issue
Block a user