diff options
author | chai <chaifix@163.com> | 2018-11-15 08:32:38 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-15 08:32:38 +0800 |
commit | a6f2d5fff89b7322009c46a9272668ca4c32ce64 (patch) | |
tree | ff81127c3be8bde426e57db544d69b9616ddc25b /src/lua/modules/graphics/je_lua_page.cpp | |
parent | 611d12bdd245dd43b7434661d3e24f2b435378cb (diff) |
*修改代码结构
Diffstat (limited to 'src/lua/modules/graphics/je_lua_page.cpp')
-rw-r--r-- | src/lua/modules/graphics/je_lua_page.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_page.cpp b/src/lua/modules/graphics/je_lua_page.cpp index 3ebd557..526c2ec 100644 --- a/src/lua/modules/graphics/je_lua_page.cpp +++ b/src/lua/modules/graphics/je_lua_page.cpp @@ -1,5 +1,5 @@ #include "lua/modules/luax.h" -#include "lua/modules/types.h" + #include "lua/common/je_lua_common.h" #include "libjin/jin.h" @@ -14,17 +14,19 @@ namespace JinEngine namespace Lua { + const char* Jin_Lua_Page = "Page"; + typedef Shared<Font>& SharedFont; Page* getPage(lua_State* L) { - Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_PAGE); + Proxy* proxy = (Proxy*)luax_checktype(L, 1, Jin_Lua_Page); return proxy->getObject<Page>(); } LUA_IMPLEMENT int l_gc(lua_State* L) { - Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_PAGE); + Proxy* proxy = (Proxy*)luax_checktype(L, 1, Jin_Lua_Page); proxy->release(); return 0; } @@ -60,7 +62,7 @@ namespace JinEngine { "getHeight", l_getHeight }, { 0, 0 } }; - luax_newtype(L, JIN_GRAPHICS_PAGE, f); + luax_newtype(L, Jin_Lua_Page, f); return 0; } |