aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_ttf_data.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-22 12:23:12 +0800
committerchai <chaifix@163.com>2018-11-22 12:23:12 +0800
commit7a20483f06624e82feb129c9e4c8fa13881a6a9f (patch)
tree82707e7546fe14d1b781a2e15f65f6ef976ac322 /src/lua/modules/graphics/je_lua_ttf_data.cpp
parent7256d216ecf154d6418c1f3b36dd58a2b69b7827 (diff)
*修改lua bind
Diffstat (limited to 'src/lua/modules/graphics/je_lua_ttf_data.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_ttf_data.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_ttf_data.cpp b/src/lua/modules/graphics/je_lua_ttf_data.cpp
index dedf082..aa2280f 100644
--- a/src/lua/modules/graphics/je_lua_ttf_data.cpp
+++ b/src/lua/modules/graphics/je_lua_ttf_data.cpp
@@ -22,11 +22,10 @@ namespace JinEngine
int fontsize = luax_checkinteger(L, 2);
Shared<TTFData>& shrFontData = pxyTTFData->getShared<TTFData>();
TTFData* fontData = shrFontData.getObject();
- Proxy* pxyTTF = luax_newinstance(L, Jin_Lua_TTF);
TTF* font = fontData->createTTF(fontsize);
Shared<TTF>* shrTTF = new Shared<TTF>(font, Jin_Lua_TTF);
shrTTF->setDependency((int)TTFDependency::DEP_TTFDATA, &shrFontData);
- pxyTTF->bind(shrTTF);
+ Proxy* pxyTTF = luax_newinstance(L, Jin_Lua_TTF, shrTTF);
return 1;
}
@@ -39,12 +38,12 @@ namespace JinEngine
LUA_EXPORT void luaopen_TTFData(lua_State* L)
{
- luaL_Reg f[] = {
+ luaL_Reg methods[] = {
{ "__gc", l_gc },
{ "newTTF", l_newTTF },
{ 0, 0 }
};
- luax_newtype(L, Jin_Lua_TTFData, f);
+ luax_newtype(L, Jin_Lua_TTFData, methods);
}