add Lua bindings for GetPath* so that it's not necessary to use the ugly ElementCategory constants

This commit is contained in:
Chris Danford
2005-07-26 19:39:58 +00:00
parent b9818b6379
commit d1ff152ee2
+4
View File
@@ -911,11 +911,15 @@ public:
static int GetMetric( T* p, lua_State *L ) { lua_pushstring(L, p->GetMetric(SArg(1),SArg(2)) ); return 1; }
static int GetPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetPath((ElementCategory)IArg(1),SArg(2),SArg(3)) ); return 1; }
static int GetPathG( T* p, lua_State *L ) { lua_pushstring(L, p->GetPathG(SArg(1),SArg(2)) ); return 1; }
static int GetPathB( T* p, lua_State *L ) { lua_pushstring(L, p->GetPathB(SArg(1),SArg(2)) ); return 1; }
static void Register(lua_State *L)
{
ADD_METHOD( GetMetric )
ADD_METHOD( GetPath )
ADD_METHOD( GetPathG )
ADD_METHOD( GetPathB )
Luna<T>::Register( L );