diff options
Diffstat (limited to 'src/libjin-lua/modules/graphics/l_text.cpp')
-rw-r--r-- | src/libjin-lua/modules/graphics/l_text.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/libjin-lua/modules/graphics/l_text.cpp b/src/libjin-lua/modules/graphics/l_text.cpp new file mode 100644 index 0000000..b634947 --- /dev/null +++ b/src/libjin-lua/modules/graphics/l_text.cpp @@ -0,0 +1,31 @@ +#include "common/l_object.h" +#include "common/l_common.h" +#include "libjin/jin.h" + +using namespace JinEngine::Graphics; + +namespace JinEngine +{ + namespace Lua + { + + const char* Jin_Lua_Text = "Text"; + + LUA_IMPLEMENT int l_gc(lua_State* L) + { + LuaObject* p = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Text); + p->release(); + return 0; + } + + LUA_EXPORT void luaopen_Text(lua_State* L) + { + luaL_Reg methods[] = { + { "__gc", l_gc }, + { 0, 0 } + }; + luax_newtype(L, Jin_Lua_Text, methods); + } + + } // namespace Lua +} // namespace JinEngine
\ No newline at end of file |