cleanup, folder restructure and ui restructure

This commit is contained in:
Luca 2024-09-20 19:32:32 +02:00
parent 6ce579026b
commit b24117740b
28 changed files with 473 additions and 367 deletions

View file

@ -1,16 +1,23 @@
extends MarginContainer
class_name MonsterList
@onready var monster_list_entry_container: MarginContainer = $MarginContainer/PanelContainer/VBoxContainer/MonsterListEntryContainer
@onready var monster_list_entry = preload("res://scenes/ui/monster_list_entry.tscn")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
visible = false
func _on_close_button_pressed() -> void:
visible = false
pass # Replace with function body.
func _update_monster_list() -> void:
for i in Inventory.monsters.size():
var monster = Inventory.monsters[i]
var entry = monster_list_entry.instantiate()
# populate the new entry
entry.populate(Inventory.monsters[i])
# add it to the list
monster_list_entry_container.add_child(entry)