[Course] add GetCourseDir(), HasBackground(), IsAnEdit() Lua bindings.
This commit is contained in:
@@ -1066,6 +1066,7 @@ public:
|
|||||||
}
|
}
|
||||||
static int GetBannerPath( T* p, lua_State *L ) { RString s = p->GetBannerPath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; }
|
static int GetBannerPath( T* p, lua_State *L ) { RString s = p->GetBannerPath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; }
|
||||||
static int GetBackgroundPath( T* p, lua_State *L ) { RString s = p->GetBackgroundPath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; }
|
static int GetBackgroundPath( T* p, lua_State *L ) { RString s = p->GetBackgroundPath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; }
|
||||||
|
static int GetCourseDir( T* p, lua_State *L ) { lua_pushstring(L, p->m_sPath ); return 1; }
|
||||||
static int GetGroupName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGroupName ); return 1; }
|
static int GetGroupName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGroupName ); return 1; }
|
||||||
static int IsAutogen( T* p, lua_State *L ) { lua_pushboolean(L, p->m_bIsAutogen ); return 1; }
|
static int IsAutogen( T* p, lua_State *L ) { lua_pushboolean(L, p->m_bIsAutogen ); return 1; }
|
||||||
static int GetEstimatedNumStages( T* p, lua_State *L ) { lua_pushnumber(L, p->GetEstimatedNumStages() ); return 1; }
|
static int GetEstimatedNumStages( T* p, lua_State *L ) { lua_pushnumber(L, p->GetEstimatedNumStages() ); return 1; }
|
||||||
@@ -1084,6 +1085,8 @@ public:
|
|||||||
DEFINE_METHOD( IsOni, IsOni() )
|
DEFINE_METHOD( IsOni, IsOni() )
|
||||||
DEFINE_METHOD( GetGoalSeconds, m_fGoalSeconds )
|
DEFINE_METHOD( GetGoalSeconds, m_fGoalSeconds )
|
||||||
static int HasBanner( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBanner() ); return 1; }
|
static int HasBanner( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBanner() ); return 1; }
|
||||||
|
static int HasBackground( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBackground() ); return 1; }
|
||||||
|
DEFINE_METHOD( IsAnEdit, IsAnEdit() )
|
||||||
|
|
||||||
LunaCourse()
|
LunaCourse()
|
||||||
{
|
{
|
||||||
@@ -1097,6 +1100,7 @@ public:
|
|||||||
ADD_METHOD( GetAllTrails );
|
ADD_METHOD( GetAllTrails );
|
||||||
ADD_METHOD( GetBannerPath );
|
ADD_METHOD( GetBannerPath );
|
||||||
ADD_METHOD( GetBackgroundPath ); // sm-ssc addition
|
ADD_METHOD( GetBackgroundPath ); // sm-ssc addition
|
||||||
|
ADD_METHOD( GetCourseDir ); // sm-ssc addition
|
||||||
ADD_METHOD( GetGroupName );
|
ADD_METHOD( GetGroupName );
|
||||||
ADD_METHOD( IsAutogen );
|
ADD_METHOD( IsAutogen );
|
||||||
ADD_METHOD( GetEstimatedNumStages );
|
ADD_METHOD( GetEstimatedNumStages );
|
||||||
@@ -1106,6 +1110,8 @@ public:
|
|||||||
ADD_METHOD( IsOni ); // sm-ssc addition
|
ADD_METHOD( IsOni ); // sm-ssc addition
|
||||||
ADD_METHOD( GetGoalSeconds );
|
ADD_METHOD( GetGoalSeconds );
|
||||||
ADD_METHOD( HasBanner ); // sm-ssc addition
|
ADD_METHOD( HasBanner ); // sm-ssc addition
|
||||||
|
ADD_METHOD( HasBackground ); // sm-ssc addition
|
||||||
|
ADD_METHOD( IsAnEdit );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -94,7 +94,7 @@ public:
|
|||||||
RString GetDisplayMainTitle() const;
|
RString GetDisplayMainTitle() const;
|
||||||
RString GetDisplaySubTitle() const;
|
RString GetDisplaySubTitle() const;
|
||||||
|
|
||||||
/* Returns the transliterated titles, if any; otherwise returns the main titles. */
|
// Returns the transliterated titles, if any; otherwise returns the main titles.
|
||||||
RString GetTranslitMainTitle() const { return m_sMainTitleTranslit.size()? m_sMainTitleTranslit: m_sMainTitle; }
|
RString GetTranslitMainTitle() const { return m_sMainTitleTranslit.size()? m_sMainTitleTranslit: m_sMainTitle; }
|
||||||
RString GetTranslitSubTitle() const { return m_sSubTitleTranslit.size()? m_sSubTitleTranslit: m_sSubTitle; }
|
RString GetTranslitSubTitle() const { return m_sSubTitleTranslit.size()? m_sSubTitleTranslit: m_sSubTitle; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user