Added SetAllowLateJoin to ScreenWithMenuElements.

This commit is contained in:
Kyzentun
2014-02-12 17:18:13 -07:00
parent 3f1c96d10f
commit 779e3da286
4 changed files with 15 additions and 0 deletions
+8
View File
@@ -25,6 +25,7 @@ ScreenWithMenuElements::ScreenWithMenuElements()
FOREACH_PlayerNumber( p )
m_MemoryCardDisplay[p] = NULL;
m_MenuTimer = NULL;
m_bShouldAllowLateJoin= false;
}
void ScreenWithMenuElements::Init()
@@ -377,11 +378,18 @@ class LunaScreenWithMenuElements: public Luna<ScreenWithMenuElements>
public:
static int Cancel( T* p, lua_State *L ) { p->Cancel( SM_GoToPrevScreen ); return 0; }
static int IsTransitioning( T* p, lua_State *L ) { lua_pushboolean( L, p->IsTransitioning() ); return 1; }
static int SetAllowLateJoin( T* p, lua_State *L )
{
p->m_bShouldAllowLateJoin= BArg(1);
return 0;
}
LunaScreenWithMenuElements()
{
ADD_METHOD( Cancel );
ADD_METHOD( IsTransitioning );
ADD_METHOD( SetAllowLateJoin );
}
};
+3
View File
@@ -33,6 +33,9 @@ public:
// Lua
virtual void PushSelf( lua_State *L );
virtual bool AllowLateJoin() const { return m_bShouldAllowLateJoin; }
bool m_bShouldAllowLateJoin; // So that it can be exposed to Lua.
protected:
virtual void StartPlayingMusic();
void SetHelpText( RString s );