#233 fixed mouse enter/exit behavior via simplification

This commit is contained in:
Mikayla Fischler
2023-05-18 10:58:42 -04:00
parent 82e3fa494c
commit beda7624f4
4 changed files with 18 additions and 21 deletions

View File

@@ -84,9 +84,9 @@ local function push_button(args)
show_pressed()
elseif event.type == CLICK_TYPE.UP then
show_unpressed()
args.callback()
elseif event.type == CLICK_TYPE.EXITED then
show_unpressed()
if e.in_bounds(event.current.x, event.current.y) then
args.callback()
end
end
end
end