add code to go back in event mode
This commit is contained in:
@@ -64,6 +64,7 @@ const CString g_sCodeNames[CodeDetector::NUM_CODES] = {
|
||||
"NextBannerGroup2",
|
||||
"SaveScreenshot",
|
||||
"CancelAllPlayerOptions",
|
||||
"BackInEventMode",
|
||||
};
|
||||
|
||||
CodeItem g_CodeItems[CodeDetector::NUM_CODES];
|
||||
|
||||
@@ -76,6 +76,7 @@ public:
|
||||
CODE_BW_NEXT_GROUP2,
|
||||
CODE_SAVE_SCREENSHOT,
|
||||
CODE_CANCEL_ALL_PLAYER_OPTIONS,
|
||||
CODE_BACK_IN_EVENT_MODE,
|
||||
NUM_CODES // leave this at the end
|
||||
};
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "ProfileManager.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "MemoryCardManager.h"
|
||||
#include "CodeDetector.h"
|
||||
|
||||
ScreenManager* SCREENMAN = NULL; // global and accessable from anywhere in our program
|
||||
|
||||
@@ -483,6 +484,14 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
|
||||
// LOG->Trace( "ScreenManager::Input( %d-%d, %d-%d, %d-%d, %d-%d )",
|
||||
// DeviceI.device, DeviceI.button, GameI.controller, GameI.button, MenuI.player, MenuI.button, StyleI.player, StyleI.col );
|
||||
|
||||
// check back in event mode
|
||||
if( CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_BACK_IN_EVENT_MODE) )
|
||||
{
|
||||
MenuInput mi(MenuI.player,MENU_BUTTON_BACK);
|
||||
m_ScreenStack.back()->Input( DeviceI, type, GameI, mi, StyleI );
|
||||
return;
|
||||
}
|
||||
|
||||
// pass input only to topmost state
|
||||
if( !m_ScreenStack.empty() )
|
||||
m_ScreenStack.back()->Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||
|
||||
Reference in New Issue
Block a user