fix lua windows to allow -1 for position again (centers the window)

This commit is contained in:
jacob1 2015-09-16 01:48:15 -04:00
parent 81b2efaf5b
commit e9043c93aa

View File

@ -61,9 +61,9 @@ LuaWindow::LuaWindow(lua_State * l) :
int sizeY = luaL_optinteger(l, 4, 10); int sizeY = luaL_optinteger(l, 4, 10);
// We should replace this with errors // We should replace this with errors
if (posX < 1) if (posX < 1 && posX != -1)
posX = 1; posX = 1;
if (posY < 1) if (posY < 1 && posY != -1)
posY = 1; posY = 1;
if (sizeX < 10) if (sizeX < 10)
sizeX = 10; sizeX = 10;