diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index c87d989ad5..c8604675ee 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -40,8 +40,6 @@ void Screen::Init() { ALLOW_OPERATOR_MENU_BUTTON.Load( m_sName, "AllowOperatorMenuButton" ); - m_fLockInputSecs = 0; - SetFOV( 0 ); m_smSendOnPop = SM_None; @@ -75,6 +73,8 @@ void Screen::BeginScreen() * here, so a reused screen doesn't inherit these from the last time it was used. */ m_sNextScreen = RString(); + m_fLockInputSecs = 0; + this->RunCommands( THEME->GetMetricA(m_sName, "ScreenOnCommand") ); } @@ -316,6 +316,7 @@ class LunaScreen: public Luna public: LunaScreen() { LUA->Register( Register ); } static int GetNextScreen( T* p, lua_State *L ) { lua_pushstring(L, p->GetNextScreen() ); return 1; } + static int lockinput( T* p, lua_State *L ) { p->SetLockInputSecs(FArg(1)); return 0; } static int PostScreenMessage( T* p, lua_State *L ) { @@ -329,6 +330,7 @@ public: { ADD_METHOD( GetNextScreen ); ADD_METHOD( PostScreenMessage ); + ADD_METHOD( lockinput ); Luna::Register( L ); } diff --git a/stepmania/src/Screen.h b/stepmania/src/Screen.h index c8c720a0fa..e0985deff9 100644 --- a/stepmania/src/Screen.h +++ b/stepmania/src/Screen.h @@ -52,6 +52,7 @@ public: virtual bool OverlayInput( const InputEventPlus &input ); virtual void Input( const InputEventPlus &input ); virtual void HandleScreenMessage( const ScreenMessage SM ); + void SetLockInputSecs( float f ) { m_fLockInputSecs = f; } void PostScreenMessage( const ScreenMessage SM, float fDelay ); void ClearMessageQueue();