Lab data
This commit is contained in:
parent
a143c0291e
commit
e1e7c70147
39 changed files with 279 additions and 60 deletions
12
scenes/tool_generator.gd
Normal file
12
scenes/tool_generator.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends Node
|
||||
|
||||
const dnd_button = preload("res://scenes/drag_and_drop.tscn")
|
||||
|
||||
func _ready() -> void:
|
||||
for tool in ReactionRegistry.current_lab.tools:
|
||||
var button = dnd_button.instantiate()
|
||||
button.draggable = tool
|
||||
button.text = tool.text
|
||||
get_parent().add_element.call_deferred(button)
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue