feat: dragon list view
This commit is contained in:
parent
577926e8fc
commit
3919df1805
17 changed files with 409 additions and 4 deletions
18
scenes/list_button.gd
Normal file
18
scenes/list_button.gd
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue