Commits

Alex Szpakowski committed f182e99

Added love.visible(boolean visible) event callback

Comments (0)

Files changed (3)

src/modules/event/sdl/Event.cpp

 			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:

src/scripts/boot.lua

 		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,

src/scripts/boot.lua.h

 	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,