27 lines
771 B
GDScript
27 lines
771 B
GDScript
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")
|
|
|
|
func _ready() -> void:
|
|
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)
|
|
|
|
func _update_player_info() -> void:
|
|
#%PlayerName.text =
|
|
pass
|