mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Added love.visible(boolean visible) event callback
This commit is contained in:
@@ -182,6 +182,8 @@ Message *Event::convert(SDL_Event &e)
|
||||
msg = new Message("focus", arg1);
|
||||
else if (e.active.state & SDL_APPMOUSEFOCUS)
|
||||
msg = new Message("mousefocus", arg1);
|
||||
else if (e.active.state & SDL_APPACTIVE)
|
||||
msg = new Message("visible", arg1);
|
||||
arg1->release();
|
||||
break;
|
||||
case SDL_QUIT:
|
||||
|
||||
@@ -188,6 +188,9 @@ function love.createhandlers()
|
||||
mousefocus = function (f)
|
||||
if love.mousefocus then return love.mousefocus(f) end
|
||||
end,
|
||||
visible = function (v)
|
||||
if love.visible then return love.visible(v) end
|
||||
end,
|
||||
quit = function ()
|
||||
return
|
||||
end,
|
||||
|
||||
@@ -336,6 +336,12 @@ const unsigned char boot_lua[] =
|
||||
0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x28, 0x66, 0x29, 0x20, 0x65,
|
||||
0x6e, 0x64, 0x0a,
|
||||
0x09, 0x09, 0x65, 0x6e, 0x64, 0x2c, 0x0a,
|
||||
0x09, 0x09, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x20, 0x28, 0x76, 0x29, 0x0a,
|
||||
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65,
|
||||
0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e,
|
||||
0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x28, 0x76, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a,
|
||||
0x09, 0x09, 0x65, 0x6e, 0x64, 0x2c, 0x0a,
|
||||
0x09, 0x09, 0x71, 0x75, 0x69, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
|
||||
0x28, 0x29, 0x0a,
|
||||
0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x0a,
|
||||
|
||||
Reference in New Issue
Block a user