12 lines
288 B
GDScript
12 lines
288 B
GDScript
extends Node
|
|
|
|
const dnd_button = preload("res://scenes/drag_and_drop.tscn")
|
|
|
|
func _ready() -> void:
|
|
for tool in LabRuntime.current_lab.tools:
|
|
var button = dnd_button.instantiate()
|
|
button.draggable = tool
|
|
button.text = tool.text
|
|
get_parent().add_element.call_deferred(button)
|
|
|
|
|