[OptionRow] Added GetLayoutType() and GetSelectType() Lua bindings.
This commit is contained in:
@@ -17,6 +17,7 @@ sm-ssc v1.2.3 | 201102??
|
|||||||
--------
|
--------
|
||||||
* Reverted ArrowSpacing back to 64 (which was the previous value).
|
* Reverted ArrowSpacing back to 64 (which was the previous value).
|
||||||
Please re-adjust your speed mods accordingly. [AJ]
|
Please re-adjust your speed mods accordingly. [AJ]
|
||||||
|
* [OptionRow] Added GetLayoutType() and GetSelectType() Lua bindings. [AJ]
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
sm-ssc v1.2.2 | 20110220
|
sm-ssc v1.2.2 | 20110220
|
||||||
|
|||||||
@@ -944,8 +944,10 @@ class LunaOptionRow: public Luna<OptionRow>
|
|||||||
public:
|
public:
|
||||||
DEFINE_METHOD( FirstItemGoesDown, GetFirstItemGoesDown() )
|
DEFINE_METHOD( FirstItemGoesDown, GetFirstItemGoesDown() )
|
||||||
static int GetChoiceInRowWithFocus( T* p, lua_State *L ) { lua_pushnumber( L, p->GetChoiceInRowWithFocus(Enum::Check<PlayerNumber>(L, 1)) ); return 1; }
|
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 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; }
|
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() )
|
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 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; }
|
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( FirstItemGoesDown );
|
||||||
ADD_METHOD( GetChoiceInRowWithFocus );
|
ADD_METHOD( GetChoiceInRowWithFocus );
|
||||||
|
ADD_METHOD( GetLayoutType );
|
||||||
ADD_METHOD( GetName );
|
ADD_METHOD( GetName );
|
||||||
ADD_METHOD( GetNumChoices );
|
ADD_METHOD( GetNumChoices );
|
||||||
ADD_METHOD( GetRowTitle );
|
ADD_METHOD( GetRowTitle );
|
||||||
|
ADD_METHOD( GetSelectType );
|
||||||
ADD_METHOD( HasFocus );
|
ADD_METHOD( HasFocus );
|
||||||
ADD_METHOD( OneChoiceForAllPlayers );
|
ADD_METHOD( OneChoiceForAllPlayers );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ static const char *SelectTypeNames[] = {
|
|||||||
};
|
};
|
||||||
XToString( SelectType );
|
XToString( SelectType );
|
||||||
StringToX( SelectType );
|
StringToX( SelectType );
|
||||||
|
LuaXType( SelectType );
|
||||||
|
|
||||||
static const char *LayoutTypeNames[] = {
|
static const char *LayoutTypeNames[] = {
|
||||||
"ShowAllInRow",
|
"ShowAllInRow",
|
||||||
@@ -43,6 +44,7 @@ static const char *LayoutTypeNames[] = {
|
|||||||
};
|
};
|
||||||
XToString( LayoutType );
|
XToString( LayoutType );
|
||||||
StringToX( LayoutType );
|
StringToX( LayoutType );
|
||||||
|
LuaXType( LayoutType );
|
||||||
|
|
||||||
RString OptionRowHandler::OptionTitle() const
|
RString OptionRowHandler::OptionTitle() const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user