Added love.window.close (resolves issue #1059), and renamed love.window.isCreated to love.window.isOpen.

This commit is contained in:
Alex Szpakowski
2015-07-18 13:22:55 -03:00
parent 2cce18946d
commit 4cd725cee6
6 changed files with 54 additions and 58 deletions
+10 -3
View File
@@ -260,12 +260,18 @@ int w_getFullscreen(lua_State *L)
return 2;
}
int w_isCreated(lua_State *L)
int w_isOpen(lua_State *L)
{
luax_pushboolean(L, instance()->isCreated());
luax_pushboolean(L, instance()->isOpen());
return 1;
}
int w_close(lua_State * /*L*/)
{
instance()->close();
return 0;
}
int w_getDesktopDimensions(lua_State *L)
{
int width = 0, height = 0;
@@ -499,7 +505,8 @@ static const luaL_Reg functions[] =
{ "getFullscreenModes", w_getFullscreenModes },
{ "setFullscreen", w_setFullscreen },
{ "getFullscreen", w_getFullscreen },
{ "isCreated", w_isCreated },
{ "isOpen", w_isOpen },
{ "close", w_close },
{ "getDesktopDimensions", w_getDesktopDimensions },
{ "setPosition", w_setPosition },
{ "getPosition", w_getPosition },