simpler Lua boilerplate
This commit is contained in:
@@ -145,14 +145,13 @@ void OptionIconRow::SetFromGameState( PlayerNumber pn )
|
||||
class LunaOptionIconRow: public Luna<OptionIconRow>
|
||||
{
|
||||
public:
|
||||
LunaOptionIconRow() { LUA->Register( Register ); }
|
||||
static int set( T* p, lua_State *L ) { p->SetFromGameState( Enum::Check<PlayerNumber>(L, 1) ); return 0; }
|
||||
|
||||
static void Register(lua_State *L)
|
||||
LunaOptionIconRow()
|
||||
{
|
||||
ADD_METHOD( set );
|
||||
LUA->Register( Register );
|
||||
|
||||
Luna<T>::Register( L );
|
||||
ADD_METHOD( set );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user