lab menu
This commit is contained in:
parent
309bbcac5e
commit
c7788ed121
8 changed files with 100 additions and 32 deletions
14
ui/lab_menu.gd
Normal file
14
ui/lab_menu.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
extends Node
|
||||
|
||||
const LAB_DIR = "res://labs/"
|
||||
|
||||
func _ready() -> void:
|
||||
for lab_file in ResourceLoader.list_directory(LAB_DIR):
|
||||
if lab_file.ends_with("/"):
|
||||
continue
|
||||
|
||||
var lab: Labwork = load(LAB_DIR + lab_file)
|
||||
var button: Button = Button.new()
|
||||
button.pressed.connect(LabRuntime.start_lab.bind(lab))
|
||||
add_child(button)
|
||||
button.text = lab.lab_name
|
||||
Loading…
Add table
Add a link
Reference in a new issue