81 lines
2.1 KiB
Plaintext
81 lines
2.1 KiB
Plaintext
[gd_scene load_steps=2 format=2]
|
|
|
|
[sub_resource type="GDScript" id=1]
|
|
script/source = "extends VBoxContainer
|
|
|
|
var cards:Array = []
|
|
onready var card_template = get_tree().root.get_child(0).card_template
|
|
onready var next_board:VBoxContainer = get_tree().root.get_child(0).card_list
|
|
|
|
func _on_Button_pressed():
|
|
cards.append(card_template.duplicate())
|
|
get_tree().root.get_child(0).all_cards.append(cards[cards.size()-1])
|
|
push_children()
|
|
|
|
func push_children():
|
|
for child in next_board.get_children():
|
|
next_board.remove_child(child)
|
|
|
|
for card in cards:
|
|
next_board.add_child(card)
|
|
|
|
func _on_audio_select_pressed():
|
|
$FileDialog.show()
|
|
$FileDialog.size.x = 250
|
|
$FileDialog.size.y = 250
|
|
"
|
|
|
|
[node name="Ingest Story" type="VBoxContainer"]
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
margin_right = -1846.0
|
|
margin_bottom = -942.0
|
|
script = SubResource( 1 )
|
|
|
|
[node name="Name" type="Label" parent="."]
|
|
margin_right = 300.0
|
|
margin_bottom = 14.0
|
|
text = "Card Name"
|
|
|
|
[node name="LineEdit" type="LineEdit" parent="."]
|
|
margin_top = 18.0
|
|
margin_right = 300.0
|
|
margin_bottom = 42.0
|
|
|
|
[node name="Story" type="Label" parent="."]
|
|
margin_top = 46.0
|
|
margin_right = 300.0
|
|
margin_bottom = 60.0
|
|
text = "Description"
|
|
|
|
[node name="TextEdit" type="TextEdit" parent="."]
|
|
margin_top = 64.0
|
|
margin_right = 300.0
|
|
margin_bottom = 134.0
|
|
rect_min_size = Vector2( 300, 70 )
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
|
margin_top = 138.0
|
|
margin_right = 300.0
|
|
margin_bottom = 158.0
|
|
|
|
[node name="add_card" type="Button" parent="HBoxContainer"]
|
|
margin_right = 67.0
|
|
margin_bottom = 20.0
|
|
text = "add Card"
|
|
|
|
[node name="audio_select" type="Button" parent="HBoxContainer"]
|
|
margin_left = 71.0
|
|
margin_right = 163.0
|
|
margin_bottom = 20.0
|
|
text = "select Audio"
|
|
|
|
[node name="FileDialog" type="FileDialog" parent="."]
|
|
margin_top = 162.0
|
|
margin_right = 315.0
|
|
margin_bottom = 292.0
|
|
|
|
[connection signal="mouse_entered" from="." to="." method="push_children"]
|
|
[connection signal="pressed" from="HBoxContainer/add_card" to="." method="_on_Button_pressed"]
|
|
[connection signal="pressed" from="HBoxContainer/audio_select" to="." method="_on_audio_select_pressed"]
|