This commit is contained in:
Jacek Jendrzej
2016-08-20 09:54:12 +02:00
parent a648daba75
commit 27ddf8935d

View File

@@ -140,14 +140,14 @@ int CLuaInstCCText::CCTextNew(lua_State *L)
CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL;
if(pw){
if(dx == -1)
if(dx < 1)
dx = pw->getHeight();
if(dy == -1)
if(dy < 1)
dy = pw->getWidth();
}
if(dx == -1)
if(dx < 1)
dx = 100;
if(dy == -1)
if(dy < 1)
dy = 100;
CLuaCCText **udata = (CLuaCCText **) lua_newuserdata(L, sizeof(CLuaCCText *));