mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
@@ -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 }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user