Merge pull request #45 from kyzentun/SetAllowLateJoin

Added SetAllowLateJoin to ScreenWithMenuElements.
This commit is contained in:
Jason Felds
2014-02-14 19:21:41 -05:00
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 );