add Lua method bindings
This commit is contained in:
@@ -1158,6 +1158,7 @@ public:
|
||||
static int GetIndex( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iIndex ); return 1; }
|
||||
static int GetMultiPlayer( T* p, lua_State *L ) { lua_pushnumber(L, p->m_MultiPlayer); return 1; }
|
||||
static int GetProfileID( T* p, lua_State *L ) { lua_pushstring(L, p->m_sProfileID ); return 1; }
|
||||
static int GetSong( T* p, lua_State *L ) { if(p->m_pSong==NULL) lua_pushnil(L); else p->m_pSong->PushSelf(L); return 1; }
|
||||
|
||||
static void Register(lua_State *L)
|
||||
{
|
||||
@@ -1166,6 +1167,7 @@ public:
|
||||
ADD_METHOD( GetIndex )
|
||||
ADD_METHOD( GetMultiPlayer )
|
||||
ADD_METHOD( GetProfileID )
|
||||
ADD_METHOD( GetSong )
|
||||
|
||||
Luna<T>::Register( L );
|
||||
}
|
||||
|
||||
@@ -1535,6 +1535,8 @@ public:
|
||||
static int GetSongDir( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongDir() ); return 1; }
|
||||
static int GetBannerPath( T* p, lua_State *L ) { if( !p->HasBanner() ) lua_pushnil(L); else lua_pushstring(L, p->GetBannerPath()); return 1; }
|
||||
static int GetBackgroundPath( T* p, lua_State *L ) { if( !p->HasBackground() ) lua_pushnil(L); else lua_pushstring(L, p->GetBackgroundPath()); return 1; }
|
||||
static int IsTutorial( T* p, lua_State *L ) { lua_pushboolean(L, p->IsTutorial()); return 1; }
|
||||
|
||||
static void Register(lua_State *L)
|
||||
{
|
||||
ADD_METHOD( GetDisplayFullTitle )
|
||||
@@ -1549,6 +1551,7 @@ public:
|
||||
ADD_METHOD( GetSongDir )
|
||||
ADD_METHOD( GetBannerPath )
|
||||
ADD_METHOD( GetBackgroundPath )
|
||||
ADD_METHOD( IsTutorial )
|
||||
Luna<T>::Register( L );
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user