simpler Lua boilerplate
This commit is contained in:
@@ -1250,14 +1250,13 @@ void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir )
|
||||
class LunaScreenOptions: public Luna<ScreenOptions>
|
||||
{
|
||||
public:
|
||||
LunaScreenOptions() { LUA->Register( Register ); }
|
||||
|
||||
static int GetCurrentRow( T* p, lua_State *L ) { lua_pushnumber( L, p->GetCurrentRow(Enum::Check<PlayerNumber>(L, 1)) ); return 1; }
|
||||
static void Register( Lua *L )
|
||||
{
|
||||
ADD_METHOD( GetCurrentRow );
|
||||
|
||||
Luna<T>::Register( L );
|
||||
LunaScreenOptions()
|
||||
{
|
||||
LUA->Register( Register );
|
||||
|
||||
ADD_METHOD( GetCurrentRow );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user