Commits

Bart van Strien committed 796c486

Add love.mousefocus (partial issue #120) temporary name (see issue #573) and it's waiting for an exposed love.window to get a check, too

  • Participants
  • Parent commits d4f520f

Comments (0)

Files changed (3)

File src/modules/event/sdl/Event.cpp

 		arg1 = new Variant(e.active.gain != 0);
 		if (e.active.state & SDL_APPINPUTFOCUS)
 			msg = new Message("focus", arg1);
+		else if (e.active.state & SDL_APPMOUSEFOCUS)
+			msg = new Message("mousefocus", arg1);
 		arg1->release();
 		break;
 	case SDL_QUIT:

File src/scripts/boot.lua

 		focus = function (f)
 			if love.focus then love.focus(f) end
 		end,
+		mousefocus = function (f)
+			if love.mousefocus then love.mousefocus(f) end
+		end,
 		quit = function ()
 			return
 		end,

File src/scripts/boot.lua.h

 	0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x28, 0x66, 0x29, 0x20, 
 	0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x09, 0x65, 0x6e, 0x64, 0x2c, 0x0a,
+	0x09, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x66, 0x29, 0x0a,
+	0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x66, 0x6f, 
+	0x63, 0x75, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 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, 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,