[gd_scene load_steps=2 format=2] [sub_resource type="GDScript" id=1] script/source = "extends VBoxContainer var post_its:Array = [] var connections:Array = [] onready var post_its_template = get_tree().root.get_child(0).post_it_template onready var connection_template = get_tree().root.get_child(0).connection_template onready var post_board:VBoxContainer = get_tree().root.get_child(0).post_it_list onready var connection_board:VBoxContainer = get_tree().root.get_child(0).connections_list func _on_post_it_pressed(): post_its.append(post_its_template.duplicate()) get_tree().root.get_child(0).all_post_its.append(post_its[post_its.size()-1]) push_children() func _on_connection_pressed(): connections.append(connection_template.duplicate()) push_children() func push_children(): for child in post_board.get_children(): post_board.remove_child(child) for child in connection_board.get_children(): connection_board.remove_child(child) for card in post_its: post_board.add_child(card) for card in connections: connection_board.add_child(card) func _on_choose_Audio_button_down(): $FileDialog.show() $FileDialog.rect_size = Vector2(250,250) " [node name="Ingest Card" type="VBoxContainer"] anchor_right = 1.0 anchor_bottom = 1.0 margin_right = -1616.0 script = SubResource( 1 ) [node name="Label" type="Label" parent="."] margin_right = 304.0 margin_bottom = 14.0 text = "Card Text" [node name="LineEdit" type="LineEdit" parent="."] margin_top = 18.0 margin_right = 304.0 margin_bottom = 42.0 [node name="HBoxContainer" type="HBoxContainer" parent="."] margin_top = 46.0 margin_right = 304.0 margin_bottom = 66.0 [node name="add connection" type="Button" parent="HBoxContainer"] margin_right = 113.0 margin_bottom = 20.0 text = "Add Connection" [node name="add postIt" type="Button" parent="HBoxContainer"] margin_left = 117.0 margin_right = 201.0 margin_bottom = 20.0 text = "Add Post-It" [node name="choose Audio" type="Button" parent="HBoxContainer"] margin_left = 205.0 margin_right = 304.0 margin_bottom = 20.0 text = "choose Audio" [node name="FileDialog" type="FileDialog" parent="."] visible = true margin_top = 70.0 margin_right = 304.0 margin_bottom = 320.0 rect_min_size = Vector2( 250, 250 ) window_title = "Open a File" mode = 0 [connection signal="mouse_entered" from="." to="." method="push_children"] [connection signal="button_down" from="HBoxContainer/add connection" to="." method="_on_connection_pressed"] [connection signal="button_down" from="HBoxContainer/add postIt" to="." method="_on_post_it_pressed"] [connection signal="button_down" from="HBoxContainer/choose Audio" to="." method="_on_choose_Audio_button_down"]