mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
#64 implemented
This commit is contained in:
parent
f325ac0f96
commit
3ab37d3e6a
@ -279,11 +279,13 @@ pop.mousemoved = (x, y, dx, dy, element=pop.screen) ->
|
|||||||
for i = 1, #element.child
|
for i = 1, #element.child
|
||||||
pop.mousemoved x, y, dx, dy, element.child[i]
|
pop.mousemoved x, y, dx, dy, element.child[i]
|
||||||
|
|
||||||
-- if we're hovering over something different, log it
|
-- if we're hovering over something different, log it, and call handlers if relevant
|
||||||
if element == pop.screen and pop.hovered != previously_hovered
|
if element == pop.screen and pop.hovered != previously_hovered
|
||||||
log " pop.hovered: #{pop.hovered} (#{pop.hovered.data.type})"
|
log " pop.hovered: #{pop.hovered} (#{pop.hovered.data.type})"
|
||||||
-- @todo This is where we call previously_hovered\hovered false, and pop.hovered\hovered true
|
if previously_hovered.hovered
|
||||||
-- There may be an issue where we are trying only on the lowest object in the hierarchy and we need to check multiple...
|
previously_hovered\hovered false
|
||||||
|
if pop.hovered.hovered
|
||||||
|
pop.hovered\hovered true
|
||||||
|
|
||||||
-- checks element == pop.screen so this only gets called once at the end of recursion
|
-- checks element == pop.screen so this only gets called once at the end of recursion
|
||||||
if pop.focused and pop.focused.mousemoved and element == pop.screen
|
if pop.focused and pop.focused.mousemoved and element == pop.screen
|
||||||
|
Loading…
Reference in New Issue
Block a user