2022-12-05 17:03:08 +00:00
|
|
|
[gd_scene load_steps=2 format=2]
|
|
|
|
|
|
|
|
[sub_resource type="GDScript" id=1]
|
|
|
|
script/source = "extends VBoxContainer
|
|
|
|
|
|
|
|
var post_it
|
|
|
|
|
|
|
|
func _on_card_selector_pressed():
|
|
|
|
get_tree().root.get_child(0).show_labels(self)
|
|
|
|
|
|
|
|
func select(pick):
|
|
|
|
post_it = pick
|
|
|
|
$card_selector.text = post_it.get_child(1).text
|
|
|
|
|
|
|
|
func _on_card_paster_pressed():
|
|
|
|
var tmp = get_tree().root.get_child(0).paste()
|
|
|
|
if tmp != null:
|
|
|
|
select(tmp)
|
2022-12-10 10:55:52 +00:00
|
|
|
|
|
|
|
func save():
|
2022-12-16 12:26:44 +00:00
|
|
|
var postit_export = false
|
|
|
|
if is_instance_valid(post_it):
|
|
|
|
postit_export = true
|
|
|
|
if postit_export:
|
|
|
|
return {
|
|
|
|
id = self.get_instance_id(),
|
|
|
|
weight1 = $first_weight.value,
|
|
|
|
weight2 = $second_weight.value,
|
|
|
|
postit = post_it.get_instance_id()
|
|
|
|
}
|
|
|
|
else:
|
|
|
|
return {
|
|
|
|
id = self.get_instance_id(),
|
|
|
|
weight1 = $first_weight.value,
|
|
|
|
weight2 = $second_weight.value
|
|
|
|
}
|
2022-12-12 10:32:26 +00:00
|
|
|
|
|
|
|
func digest(connection_dict:Dictionary, postit_array:Array):
|
|
|
|
$first_weight.value = connection_dict.weight1
|
|
|
|
$second_weight.value = connection_dict.weight2
|
|
|
|
for postit_dict in postit_array:
|
2022-12-16 12:26:44 +00:00
|
|
|
if connection_dict.has(\"postit\") and postit_dict.old_id == connection_dict.postit:
|
2022-12-12 10:32:26 +00:00
|
|
|
post_it = postit_dict.new_item
|
2022-12-05 17:03:08 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
[node name="Ingest Connection" type="VBoxContainer"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
margin_top = 1.0
|
|
|
|
margin_right = -1838.0
|
|
|
|
script = SubResource( 1 )
|
|
|
|
|
2022-12-10 10:55:52 +00:00
|
|
|
[node name="first_weight" type="HSlider" parent="."]
|
2022-12-05 17:03:08 +00:00
|
|
|
margin_right = 120.0
|
|
|
|
margin_bottom = 16.0
|
|
|
|
rect_min_size = Vector2( 120, 0 )
|
|
|
|
min_value = -1.0
|
|
|
|
max_value = 1.0
|
|
|
|
step = 0.0
|
|
|
|
tick_count = 3
|
|
|
|
|
|
|
|
[node name="second_weight" type="HSlider" parent="."]
|
|
|
|
margin_top = 20.0
|
|
|
|
margin_right = 120.0
|
|
|
|
margin_bottom = 36.0
|
|
|
|
rect_min_size = Vector2( 120, 0 )
|
|
|
|
min_value = -1.0
|
|
|
|
max_value = 1.0
|
|
|
|
step = 0.0
|
|
|
|
tick_count = 3
|
|
|
|
|
|
|
|
[node name="card_selector" type="Button" parent="."]
|
|
|
|
margin_top = 40.0
|
|
|
|
margin_right = 120.0
|
|
|
|
margin_bottom = 60.0
|
|
|
|
text = "select card"
|
|
|
|
|
|
|
|
[node name="card_paster" type="Button" parent="."]
|
|
|
|
margin_top = 64.0
|
|
|
|
margin_right = 120.0
|
|
|
|
margin_bottom = 84.0
|
|
|
|
text = "paste card"
|
|
|
|
|
|
|
|
[connection signal="pressed" from="card_selector" to="." method="_on_card_selector_pressed"]
|
|
|
|
[connection signal="pressed" from="card_paster" to="." method="_on_card_paster_pressed"]
|