debug: add logging to inventory overlay and backpack for click debugging
This commit is contained in:
@@ -33,6 +33,10 @@ func _ready() -> void:
|
||||
InventoryManager.combination_attempted.connect(_on_combination_attempted)
|
||||
|
||||
func show_overlay() -> void:
|
||||
print("[OVERLAY] show_overlay called, inventory has %d items" % InventoryManager.inventory.size())
|
||||
|
||||
func hide_overlay() -> void:
|
||||
print("[OVERLAY] hide_overlay called")
|
||||
_refresh_grid()
|
||||
if _fade_tween:
|
||||
_fade_tween.kill()
|
||||
@@ -95,6 +99,7 @@ func _refresh_grid() -> void:
|
||||
grid.columns = SLOTS_PER_ROW
|
||||
|
||||
func _on_slot_clicked(item_id: String) -> void:
|
||||
print("[OVERLAY] _on_slot_clicked: '%s', input_active=%s" % [item_id, input_active])
|
||||
if not input_active:
|
||||
return
|
||||
|
||||
@@ -179,6 +184,7 @@ func _update_hover_label() -> void:
|
||||
hover_label.text = ""
|
||||
|
||||
func _on_background_gui_input(event: InputEvent) -> void:
|
||||
print("[OVERLAY] background clicked")
|
||||
if event is InputEventMouseButton and event.button_index == 1 and event.pressed:
|
||||
hide_overlay()
|
||||
close_requested.emit()
|
||||
|
||||
Reference in New Issue
Block a user