fix: allows inactive/non-interactive item clicks to pass through to appropriate background click event

This commit is contained in:
Duncan Brown committed 2022-08-23 18:48:16 -04:00
1 parent 813495051b
commit 5b315bb0ee
1 file changed
+12
@@ -344,6 +344,10 @@ func _on_mouse_left_clicked_item(item: ESCItem, event: InputEvent) -> void:
self, self,
"Ignoring left click on %s with event %s." % [item.global_id, event] "Ignoring left click on %s with event %s." % [item.global_id, event]
) )
# Treat this as a background click now
_on_left_click_on_bg(item.global_position)
return return
if hover_stack.empty() or hover_stack.back() == item: if hover_stack.empty() or hover_stack.back() == item:
@@ -374,6 +378,10 @@ func _on_mouse_left_double_clicked_item(
self, self,
"Ignoring double-left click on %s with event %s." % [item.global_id, event] "Ignoring double-left click on %s with event %s." % [item.global_id, event]
) )
# Treat this as a background click now
_on_double_left_click_on_bg(item.global_position)
return return
escoria.logger.info( escoria.logger.info(
@@ -400,6 +408,10 @@ func _on_mouse_right_clicked_item(item: ESCItem, event: InputEvent) -> void:
self, self,
"Ignoring right click on %s with event %s." % [item.global_id, event] "Ignoring right click on %s with event %s." % [item.global_id, event]
) )
# Treat this as a background click now
_on_right_click_on_bg(item.global_position)
return return
escoria.logger.info( escoria.logger.info(