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

This commit is contained in:
Duncan Brown
2022-08-23 20:06:14 -04:00
committed by Julian Murgia
parent 6c4b2618a5
commit 210f0d25e4

View File

@@ -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