update registration for various types

This commit is contained in:
Glenn Maynard
2005-06-20 04:17:02 +00:00
parent 9f51cfbf5a
commit c998564adf
8 changed files with 143 additions and 131 deletions
+21 -4
View File
@@ -9,10 +9,6 @@
#include "ActorUtil.h"
#include <sstream>
// lua start
LUA_REGISTER_CLASS( ActorScroller )
// lua end
/* Tricky: We need ActorFrames created in XML to auto delete their children.
* We don't want classes that derive from ActorFrame to auto delete their
* children. The name "ActorFrame" is widely used in XML, so we'll have
@@ -282,6 +278,27 @@ void ActorScroller::DrawPrimitives()
}
}
// lua start
#include "LuaBinding.h"
template<class T>
class LunaActorScroller : public Luna<T>
{
public:
LunaActorScroller() { LUA->Register( Register ); }
static int SetCurrentAndDestinationItem( T* p, lua_State *L ) { p->SetCurrentAndDestinationItem( FArg(1) ); return 0; }
static void Register(lua_State *L)
{
ADD_METHOD( SetCurrentAndDestinationItem )
Luna<T>::Register( L );
}
};
LUA_REGISTER_DERIVED_CLASS( ActorScroller, ActorFrame )
// lua end
/*
* (c) 2003-2004 Chris Danford
* All rights reserved.