Available since LÖVE 0.9.0
This callback is not supported in earlier versions.
Callback function triggered when window receives or loses mouse focus.
love.mousefocus( focus )
boolean focus
Nothing.
function love.load() text = "Mouse is in the window!" end function love.draw() love.graphics.print(text,0,0) end function love.mousefocus(f) if not f then text = "Mouse is not in the window!" print("LOST MOUSE FOCUS") else text = "Mouse is in the window!" print("GAINED MOUSE FOCUS") end end
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.mousefocus