aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_ttf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/graphics/je_lua_ttf.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_ttf.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_ttf.cpp b/src/lua/modules/graphics/je_lua_ttf.cpp
index a1da345..7fea04b 100644
--- a/src/lua/modules/graphics/je_lua_ttf.cpp
+++ b/src/lua/modules/graphics/je_lua_ttf.cpp
@@ -45,21 +45,20 @@ namespace JinEngine
Text* text = pxyText->getObject<Text>();
page = ttf->typeset(*text, lineheight, spacing);
}
- Proxy* pxyPage = luax_newinstance(L, Jin_Lua_Page);
Shared<Page>* refPage = new Shared<Page>(page, Jin_Lua_Page);
refPage->setDependency((int)PageDependency::DEP_TTF, &shrTTF);
- pxyPage->bind(refPage);
+ Proxy* pxyPage = luax_newinstance(L, Jin_Lua_Page, refPage);
return 1;
}
LUA_EXPORT void luaopen_TTF(lua_State* L)
{
- luaL_Reg f[] = {
+ luaL_Reg methods[] = {
{ "__gc", l_gc },
{ "typeset", l_typeset },
{ 0, 0 }
};
- luax_newtype(L, Jin_Lua_TTF, f);
+ luax_newtype(L, Jin_Lua_TTF, methods);
}
} // namespace Lua