39 lines
1.1 KiB
Text
39 lines
1.1 KiB
Text
[gd_scene load_steps=3 format=3 uid="uid://bjrk63xu7w0g8"]
|
|
|
|
[ext_resource type="PackedScene" uid="uid://b0arjg8r75f8y" path="res://Scenes/Nodes/Node.tscn" id="1_ttgyh"]
|
|
|
|
[sub_resource type="GDScript" id="GDScript_fy4sf"]
|
|
script/source = "extends GL_Node
|
|
|
|
|
|
func _ready():
|
|
super._ready()
|
|
_set_title(\"Toggle\")
|
|
_create_row(\"\",true,true,false,false,0)
|
|
_update_visuals()
|
|
|
|
func _process(delta):
|
|
super._process(delta)
|
|
for key in rows:
|
|
rows[key][\"output\"] = rows[key][\"input\"]
|
|
apply_pick_values()
|
|
|
|
if rows[\"On\"][\"output\"] == true:
|
|
rows[\"Value\"][\"output\"] = 1 - rows[\"Value\"][\"input\"]
|
|
else:
|
|
rows[\"Value\"][\"output\"] = rows[\"Value\"][\"input\"]
|
|
_send_input(\"Value\")
|
|
"
|
|
|
|
[node name="Node" type="Control"]
|
|
layout_mode = 3
|
|
anchors_preset = 0
|
|
mouse_filter = 1
|
|
|
|
[node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_ttgyh")]
|
|
layout_mode = 0
|
|
tooltip_text = "When triggered, output will be enabled and held until another trigger."
|
|
script = SubResource("GDScript_fy4sf")
|
|
|
|
[connection signal="mouse_entered" from="Node" to="Node" method="mouse_enter"]
|
|
[connection signal="mouse_exited" from="Node" to="Node" method="mouse_exit"]
|