allow disabling MENU_BUTTON_BACK during ScreenStage
This commit is contained in:
@@ -30,6 +30,8 @@ void ScreenStage::Init()
|
||||
{
|
||||
Screen::Init();
|
||||
|
||||
ALLOW_BACK.Load( m_sName, "AllowBack" );
|
||||
|
||||
m_bZeroDeltaOnNextUpdate = false;
|
||||
|
||||
SOUND->StopMusic();
|
||||
@@ -148,6 +150,9 @@ void ScreenStage::MenuBack( PlayerNumber pn )
|
||||
if( m_In.IsTransitioning() || m_Out.IsTransitioning() || m_Back.IsTransitioning() )
|
||||
return;
|
||||
|
||||
if( !ALLOW_BACK.GetValue() )
|
||||
return;
|
||||
|
||||
this->ClearMessageQueue();
|
||||
m_Back.StartTransitioning( SM_GoToPrevScreen );
|
||||
SOUND->PlayOnce( THEME->GetPathS("Common","back") );
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Character.h"
|
||||
#include "BitmapText.h"
|
||||
#include "ActorUtil.h"
|
||||
#include "ThemeMetric.h"
|
||||
|
||||
class ScreenStage : public Screen
|
||||
{
|
||||
@@ -21,6 +22,8 @@ public:
|
||||
virtual void MenuBack( PlayerNumber pn );
|
||||
|
||||
private:
|
||||
ThemeMetric<bool> ALLOW_BACK;
|
||||
|
||||
Transition m_In, m_Out, m_Back;
|
||||
AutoActor m_Overlay; // overlays all elements except bitmaptexts
|
||||
BitmapText m_SongTitle;
|
||||
|
||||
Reference in New Issue
Block a user