#64 implemented

This commit is contained in:
Paul Liverman III 2017-08-13 18:37:31 -07:00
parent f325ac0f96
commit 3ab37d3e6a

View File

@ -279,11 +279,13 @@ pop.mousemoved = (x, y, dx, dy, element=pop.screen) ->
for i = 1, #element.child
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
log " pop.hovered: #{pop.hovered} (#{pop.hovered.data.type})"
-- @todo This is where we call previously_hovered\hovered false, and pop.hovered\hovered true
-- There may be an issue where we are trying only on the lowest object in the hierarchy and we need to check multiple...
if previously_hovered.hovered
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
if pop.focused and pop.focused.mousemoved and element == pop.screen