Add optional "DevMenu" in-game button for quick access to things like log settings

This commit is contained in:
Henrik Rydgard committed 2013-09-07 20:54:51 +02:00
1 parent cbad7657e9
commit c31ae0645f
7 files changed
+64 -6

No files matched your search

+9
View File
@@ -49,6 +49,7 @@
#include "UI/MainScreen.h"
#include "UI/EmuScreen.h"
#include "UI/DevScreens.h"
#include "UI/GameInfoCache.h"
#include "UI/MiscScreens.h"
@@ -384,6 +385,14 @@ static const struct { int from, to; } legacy_touch_mapping[12] = {
void EmuScreen::CreateViews() {
root_ = CreatePadLayout(&pauseTrigger_);
if (g_Config.bShowDeveloperMenu) {
root_->Add(new UI::Button("DevMenu"))->OnClick.Handle(this, &EmuScreen::OnDevTools);
}
}
UI::EventReturn EmuScreen::OnDevTools(UI::EventParams &params) {
screenManager()->push(new DevMenu());
return UI::EVENT_DONE;
}
void EmuScreen::update(InputState &input) {