feat: dragon list view

This commit is contained in:
Gerard Gascón 2025-04-09 13:59:41 +02:00
parent 577926e8fc
commit 3919df1805
17 changed files with 409 additions and 4 deletions

18
scenes/list_button.gd Normal file
View file

@ -0,0 +1,18 @@
extends Button
@export var dragon_list: PackedScene
@onready var base: GameManager = $"../.."
func _on_pressed() -> void:
var list: DragonList = dragon_list.instantiate()
list.set_library(base._library)
var window_position: Vector2i = DisplayServer.window_get_position()
var window_size: Vector2i = DisplayServer.window_get_size()
list.position = window_position - list.size / 2
list.show()
add_child(list)