fix: ignores mouse enter events for non-actionable items (i.e. non-interactive or not active)

This commit is contained in:
Duncan Brown authored and Julian Murgia committed 2022-08-24 22:37:34 +02:00
1 parent 6c4b2618a5
commit 210f0d25e4
1 file changed
+8
@@ -294,6 +294,14 @@ func _on_mouse_exited_inventory_item() -> void:
#
# - item: The Escoria item hovered
func _on_mouse_entered_item(item: ESCItem) -> void:
if not escoria.action_manager.is_object_actionable(item.global_id):
escoria.logger.debug(
self,
"Ignoring mouse entering item %s." % [item.global_id]
)
return
escoria.logger.info(
self,
"Item focused: %s" % item.global_id