Work on item display windows and variant coloring for portraits and sprites.

This commit is contained in:
2025-08-30 08:01:48 -04:00
parent b93889e914
commit 149ee993dc
84 changed files with 1526 additions and 43 deletions

View File

@@ -17,6 +17,8 @@ var data : Adventurer
var item_slots : Array[ItemSlot]
var item_display_window_template = preload("res://templates/item_display_window.tscn")
func setup(adv : Adventurer) -> void:
data = adv
data.changed.connect(_on_data_changed)
@@ -24,6 +26,7 @@ func setup(adv : Adventurer) -> void:
item_slots = []
for child : ItemSlot in %InventoryGrid.get_children():
item_slots.append(child)
child.display_item.connect(_on_display_item)
#TODO: Show equipment
update_items()
@@ -61,3 +64,11 @@ func update_items() -> void:
func _on_data_changed() -> void:
update_stats()
update_items()
func _on_display_item(item : Item) -> void:
var wnd : Popup = item_display_window_template.instantiate()
adding_subwindow = true
add_child(wnd)
wnd.setup(item)
wnd.popup_centered()
adding_subwindow = false