fix a long-standing issue with tooltips
scenario: - open Carousel with more than one screen, so that there are buttons on the left and right margins - move the mouse rapidly towards the left or right off the edge of the screen Before this commit, the tooltip would remain showing after the mouse went off window. (Things were fine if the mouse moved slowly off window; then LÖVE had a chance to record the mouse coordinate on the edge before it went off edge.)
This commit is contained in:
parent
305542401b
commit
affa108ecf
|
@ -25,7 +25,7 @@ on.draw = function()
|
|||
end
|
||||
draw_menu()
|
||||
draw_next_frames_of_animations()
|
||||
if Window_in_focus then
|
||||
if Window_in_focus and Mouse_on_window then
|
||||
draw_button_tooltips(Global_state)
|
||||
end
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
Mouse_on_window = true
|
|
@ -0,0 +1,3 @@
|
|||
on.mouse_focus = function(in_focus)
|
||||
Mouse_on_window = in_focus
|
||||
end
|
Loading…
Reference in New Issue