simpler Lua boilerplate

This commit is contained in:
Glenn Maynard
2006-09-27 20:03:31 +00:00
parent ea7c05cee5
commit 153bcedd40
19 changed files with 64 additions and 96 deletions
+5 -5
View File
@@ -179,13 +179,13 @@ void GradeDisplay::SettleQuickly()
class LunaGradeDisplay: public Luna<GradeDisplay>
{
public:
LunaGradeDisplay() { LUA->Register( Register ); }
static int scroll( T* p, lua_State *L ) { p->Scroll(); return 0; }
static void Register(lua_State *L) {
ADD_METHOD( scroll );
Luna<T>::Register( L );
LunaGradeDisplay()
{
LUA->Register( Register );
ADD_METHOD( scroll );
}
};