extends Node3D

const BUTTON_SCENE = preload("res://scenes/floor_button.tscn")
const BUTTON_COUNT := 10
const Y_TOP := 8.49
const Y_BOTTOM := -4.36

@onready var _container: Node3D = $FloorButtons

func _ready() -> void:
	var spacing = (Y_TOP - Y_BOTTOM) / float(BUTTON_COUNT - 1)
	for i in range(BUTTON_COUNT):
		var btn = BUTTON_SCENE.instantiate()
		btn.name = "%02d" % i
		btn.position = Vector3(0, Y_BOTTOM + i * spacing, 0)
		_container.add_child(btn)
		var sprite: Sprite3D = btn.get_node("ButtonSprite")
		sprite.frame = i
