Skip to content

Commit

Permalink
Fix: discard non interactive items from hovering when they are hidden
Browse files Browse the repository at this point in the history
Change: set default debug level to DEBUG (was TRACE previously)
  • Loading branch information
StraToN authored and BHSDuncan committed Dec 4, 2022
1 parent 79997ea commit 29371ef
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions addons/escoria-core/game/esc_inputs_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,12 @@ func unset_hovered_node(item: ESCItem):
if _hovered_element == item:
_hovered_element.mouse_exited()
_hovered_element = null
hotspot_focused = ""
if hover_stack.back():
set_hovered_node(hover_stack.pop_back())
else:
hotspot_focused = ""




# Sets the hovered node and calls its mouse_entered() method if it was the top
Expand Down Expand Up @@ -607,7 +612,8 @@ func hover_stack_add_item(item):
# - items: the items list (array) to add to the hover stack
func hover_stack_add_items(items: Array):
for item in items:
hover_stack_add_item(item)
if escoria.action_manager.is_object_actionable(item.global_id):
hover_stack_add_item(item)


# Clean the hover stack
Expand Down

0 comments on commit 29371ef

Please sign in to comment.