Cheat menu access from gameScreen + minor bugfix +

Invalidate JIT for 0xE/0xD checks
And big thanks to [Unknown] for help:3
This commit is contained in:
LunaMoo committed 2016-06-20 11:33:02 +02:00
1 parent 0519b3ef79
commit 778c518a37
7 files changed
+54 -19

No files matched your search

+10
View File
@@ -25,6 +25,7 @@
#include "ui/ui_context.h"
#include "ui/view.h"
#include "ui/viewgroup.h"
#include "UI/CwCheatScreen.h"
#include "UI/EmuScreen.h"
#include "UI/GameScreen.h"
#include "UI/GameSettingsScreen.h"
@@ -49,6 +50,7 @@ void GameScreen::CreateViews() {
I18NCategory *di = GetI18NCategory("Dialog");
I18NCategory *ga = GetI18NCategory("Game");
I18NCategory *pa = GetI18NCategory("Pause");
// Information in the top left.
// Back button to the bottom left.
@@ -113,6 +115,9 @@ void GameScreen::CreateViews() {
#ifdef _WIN32
rightColumnItems->Add(new Choice(ga->T("Show In Folder")))->OnClick.Handle(this, &GameScreen::OnShowInFolder);
#endif
if (g_Config.bEnableCheats) {
rightColumnItems->Add(new Choice(pa->T("Cheats")))->OnClick.Handle(this, &GameScreen::OnCwCheat);
}
}
UI::EventReturn GameScreen::OnCreateConfig(UI::EventParams &e)
@@ -205,6 +210,11 @@ UI::EventReturn GameScreen::OnShowInFolder(UI::EventParams &e) {
return UI::EVENT_DONE;
}
UI::EventReturn GameScreen::OnCwCheat(UI::EventParams &e) {
screenManager()->push(new CwCheatScreen(gamePath_));
return UI::EVENT_DONE;
}
UI::EventReturn GameScreen::OnSwitchBack(UI::EventParams &e) {
screenManager()->finishDialog(this, DR_OK);
return UI::EVENT_DONE;