33 lines
959 B
GDScript
33 lines
959 B
GDScript
extends Control
|
|
|
|
@export var selectionList: Array
|
|
|
|
var options: Array
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
var font = load("res://GFX/font/cour/Courier New.ttf")
|
|
|
|
for column in range(ceil(selectionList.size() / 6.0)):
|
|
var why = 0
|
|
for i in range(6 * column, (6 * column) + 6):
|
|
if i > selectionList.size() - 1:
|
|
continue
|
|
|
|
var option = Control.new()
|
|
option.position.x = 13 + (100 * column)
|
|
option.position.y = 10 + (20 * why)
|
|
option.size = Vector2(100, 20)
|
|
var label = Label.new()
|
|
label.text = selectionList[i]
|
|
label.add_theme_font_override("font", font)
|
|
label.add_theme_color_override("font_color", Color.BLACK)
|
|
label.add_theme_font_size_override("font_size", int(58 * Global.menuScale))
|
|
option.add_child(label)
|
|
add_child(option)
|
|
why += 1
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
pass
|