[OptionRow] Added GetLayoutType() and GetSelectType() Lua bindings.
This commit is contained in:
@@ -944,8 +944,10 @@ class LunaOptionRow: public Luna<OptionRow>
|
||||
public:
|
||||
DEFINE_METHOD( FirstItemGoesDown, GetFirstItemGoesDown() )
|
||||
static int GetChoiceInRowWithFocus( T* p, lua_State *L ) { lua_pushnumber( L, p->GetChoiceInRowWithFocus(Enum::Check<PlayerNumber>(L, 1)) ); return 1; }
|
||||
DEFINE_METHOD( GetLayoutType, GetHandler()->m_Def.m_layoutType )
|
||||
static int GetName( T* p, lua_State *L ) { lua_pushstring( L, p->GetHandler()->m_Def.m_sName ); return 1; }
|
||||
static int GetNumChoices( T* p, lua_State *L ) { lua_pushnumber( L, p->GetHandler()->m_Def.m_vsChoices.size() ); return 1; }
|
||||
DEFINE_METHOD( GetSelectType, GetHandler()->m_Def.m_selectType )
|
||||
DEFINE_METHOD( GetRowTitle, GetRowTitle() )
|
||||
static int HasFocus( T* p, lua_State *L ) { lua_pushboolean( L, p->GetRowHasFocus(Enum::Check<PlayerNumber>(L, 1)) ); return 1; }
|
||||
static int OneChoiceForAllPlayers( T* p, lua_State *L ) { lua_pushboolean( L, p->GetHandler()->m_Def.m_bOneChoiceForAllPlayers ); return 1; }
|
||||
@@ -954,9 +956,11 @@ public:
|
||||
{
|
||||
ADD_METHOD( FirstItemGoesDown );
|
||||
ADD_METHOD( GetChoiceInRowWithFocus );
|
||||
ADD_METHOD( GetLayoutType );
|
||||
ADD_METHOD( GetName );
|
||||
ADD_METHOD( GetNumChoices );
|
||||
ADD_METHOD( GetRowTitle );
|
||||
ADD_METHOD( GetSelectType );
|
||||
ADD_METHOD( HasFocus );
|
||||
ADD_METHOD( OneChoiceForAllPlayers );
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ static const char *SelectTypeNames[] = {
|
||||
};
|
||||
XToString( SelectType );
|
||||
StringToX( SelectType );
|
||||
LuaXType( SelectType );
|
||||
|
||||
static const char *LayoutTypeNames[] = {
|
||||
"ShowAllInRow",
|
||||
@@ -43,6 +44,7 @@ static const char *LayoutTypeNames[] = {
|
||||
};
|
||||
XToString( LayoutType );
|
||||
StringToX( LayoutType );
|
||||
LuaXType( LayoutType );
|
||||
|
||||
RString OptionRowHandler::OptionTitle() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user