Skip to content

Commit

Permalink
fix: allows inactive/non-interactive item clicks to pass through to a…
Browse files Browse the repository at this point in the history
…ppropriate background click event
  • Loading branch information
BHSDuncan committed Aug 23, 2022
1 parent 8134950 commit 5b315bb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions addons/escoria-core/game/esc_inputs_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ func _on_mouse_left_clicked_item(item: ESCItem, event: InputEvent) -> void:
self,
"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

if hover_stack.empty() or hover_stack.back() == item:
Expand Down Expand Up @@ -374,6 +378,10 @@ func _on_mouse_left_double_clicked_item(
self,
"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

escoria.logger.info(
Expand All @@ -400,6 +408,10 @@ func _on_mouse_right_clicked_item(item: ESCItem, event: InputEvent) -> void:
self,
"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

escoria.logger.info(
Expand Down

0 comments on commit 5b315bb

Please sign in to comment.