simpler Lua boilerplate

This commit is contained in:
Glenn Maynard
2006-09-27 19:47:52 +00:00
parent e0bf203af4
commit 4002071bea
7 changed files with 29 additions and 43 deletions
+5 -6
View File
@@ -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 );
}
};