Added love.window.requestAttention. Bounces the dock icon in OS X and flashes the taskbar icon in Windows when called, if the program isn't in focus.

This commit is contained in:
Alex Szpakowski
2015-06-07 19:40:46 -03:00
parent 6ef6f85d0c
commit cf73aa0107
7 changed files with 67 additions and 2 deletions
+8
View File
@@ -483,6 +483,13 @@ int w_showMessageBox(lua_State *L)
return 1;
}
int w_requestAttention(lua_State *L)
{
bool continuous = luax_optboolean(L, 1, false);
instance()->requestAttention(continuous);
return 0;
}
static const luaL_Reg functions[] =
{
{ "getDisplayCount", w_getDisplayCount },
@@ -509,6 +516,7 @@ static const luaL_Reg functions[] =
{ "minimize", w_minimize },
{ "maximize", w_maximize },
{ "showMessageBox", w_showMessageBox },
{ "requestAttention", w_requestAttention },
{ 0, 0 }
};