allow disabling MENU_BUTTON_BACK during ScreenStage

This commit is contained in:
Glenn Maynard
2005-03-12 00:31:25 +00:00
parent ad96700fcf
commit 8708ea5f61
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -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") );
+3
View File
@@ -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;