[Screen] add HandleBackButton (for people who know what they're doing ;) [people making multi-state menus using the MK2ULTRA method])
This commit is contained in:
@@ -10,12 +10,13 @@ supported but exist anyways.)
|
||||
_____________________________________________________________________________
|
||||
|
||||
================================================================================
|
||||
sm-ssc v1.2 | 201012xx
|
||||
sm-ssc v1.2 | 201101xx
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
20101231
|
||||
20110101
|
||||
--------
|
||||
* [ScreenGameplay] Fixed "Gameplay ### combo" announcer messages. [neothe0ne]
|
||||
* [Screen] Added HandleBackButton metric; useful for custom menus that need to
|
||||
use the Back button for more user-friendly canceling. [freem]
|
||||
|
||||
20101230
|
||||
--------
|
||||
|
||||
@@ -1198,6 +1198,7 @@ BlinkPlayersBest=true
|
||||
ScreenInitCommand=
|
||||
ScreenOnCommand=
|
||||
AllowOperatorMenuButton=true
|
||||
HandleBackButton=true
|
||||
RepeatRate=-1
|
||||
RepeatDelay=-1
|
||||
PrepareScreens=
|
||||
|
||||
+5
-1
@@ -42,6 +42,7 @@ bool Screen::SortMessagesByDelayRemaining( const Screen::QueuedScreenMessage &m1
|
||||
void Screen::Init()
|
||||
{
|
||||
ALLOW_OPERATOR_MENU_BUTTON.Load( m_sName, "AllowOperatorMenuButton" );
|
||||
HANDLE_BACK_BUTTON.Load( m_sName, "HandleBackButton" );
|
||||
REPEAT_RATE.Load( m_sName, "RepeatRate" );
|
||||
REPEAT_DELAY.Load( m_sName, "RepeatDelay" );
|
||||
LIGHTS_MODE.Load( m_sName, "LightsMode" );
|
||||
@@ -204,7 +205,10 @@ void Screen::Input( const InputEventPlus &input )
|
||||
case GAME_BUTTON_BACK:
|
||||
// Don't make the user hold the back button if they're pressing escape and escape is the back button.
|
||||
if( !PREFSMAN->m_bDelayedBack || input.type==IET_REPEAT || (input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_ESC) )
|
||||
this->MenuBack( input );
|
||||
{
|
||||
if( HANDLE_BACK_BUTTON )
|
||||
this->MenuBack( input );
|
||||
}
|
||||
return;
|
||||
case GAME_BUTTON_START: this->MenuStart ( input ); return;
|
||||
case GAME_BUTTON_SELECT:this->MenuSelect( input ); return;
|
||||
|
||||
@@ -80,6 +80,7 @@ protected:
|
||||
InputQueueCodeSet m_Codes;
|
||||
|
||||
ThemeMetric<bool> ALLOW_OPERATOR_MENU_BUTTON;
|
||||
ThemeMetric<bool> HANDLE_BACK_BUTTON;
|
||||
ThemeMetric<float> REPEAT_RATE;
|
||||
ThemeMetric<float> REPEAT_DELAY;
|
||||
ThemeMetric<LightsMode> LIGHTS_MODE;
|
||||
|
||||
Reference in New Issue
Block a user