Added movement to DSL nodes to allow repositioning.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 229 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://66yiv4g7kfpv"
|
||||||
|
path="res://.godot/imported/ArrowDown.png-68a8d6a1c504a39663af15622d06d1d0.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Images/ArrowDown.png"
|
||||||
|
dest_files=["res://.godot/imported/ArrowDown.png-68a8d6a1c504a39663af15622d06d1d0.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 226 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://djxwweinn5c4i"
|
||||||
|
path="res://.godot/imported/ArrowUp.png-6639581e2ea32ca76adabf27de0fdb0d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Images/ArrowUp.png"
|
||||||
|
dest_files=["res://.godot/imported/ArrowUp.png-6639581e2ea32ca76adabf27de0fdb0d.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
Binary file not shown.
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_qemp1"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_qemp1"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_loic7"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_loic7"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_wgwvo"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_uva8b"]
|
||||||
|
|
||||||
[node name="Craft" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Craft" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -38,9 +40,21 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=479938935]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=479938935]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_loic7")
|
texture_normal = ExtResource("2_loic7")
|
||||||
|
|
||||||
|
[node name="TextureButton2" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=1763195616]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_wgwvo")
|
||||||
|
|
||||||
|
[node name="TextureButton3" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=1118894442]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_uva8b")
|
||||||
|
|
||||||
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=1811897037]
|
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=1811897037]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
@@ -63,3 +77,5 @@ tooltip_text = "Crafts the amount of the selected item."
|
|||||||
text = "Craft"
|
text = "Craft"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton2" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton3" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_rl00f"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_rl00f"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_swrbs"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_swrbs"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="Else" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Else" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -35,9 +37,21 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=479938935]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=479938935]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_swrbs")
|
texture_normal = ExtResource("2_swrbs")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="ListDisplay" type="Button" parent="." unique_id=200731038]
|
[node name="ListDisplay" type="Button" parent="." unique_id=200731038]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -45,3 +59,5 @@ tooltip_text = "Stops skipping from If-nodes"
|
|||||||
text = "Else"
|
text = "Else"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_3kgh4"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_3kgh4"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_6eg2n"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_6eg2n"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="Explore" type="PanelContainer" unique_id=1474470717 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Explore" type="PanelContainer" unique_id=1474470717 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -35,12 +37,26 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=57412049]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=57412049]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_6eg2n")
|
texture_normal = ExtResource("2_6eg2n")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="ListDisplay" type="Button" parent="." unique_id=347942160]
|
[node name="ListDisplay" type="Button" parent="." unique_id=347942160]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Randomly explores the available ruin"
|
tooltip_text = "Randomly explores the available ruin"
|
||||||
text = "Explore"
|
text = "Explore"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_xshi5"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_xshi5"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_mtk18"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_mtk18"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="Craft" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Craft" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -38,9 +40,21 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=479938935]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=479938935]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_mtk18")
|
texture_normal = ExtResource("2_mtk18")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=1896004369]
|
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=1896004369]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
@@ -59,3 +73,5 @@ tooltip_text = "Repeats the following blocks to the next for, until or while blo
|
|||||||
text = "For"
|
text = "For"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_ve3v1"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_ve3v1"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_u1say"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_u1say"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="Harvest" type="PanelContainer" unique_id=1323721153 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Harvest" type="PanelContainer" unique_id=1323721153 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -35,12 +37,26 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=661274351]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=661274351]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_u1say")
|
texture_normal = ExtResource("2_u1say")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="ListDisplay" type="Button" parent="." unique_id=884865258]
|
[node name="ListDisplay" type="Button" parent="." unique_id=884865258]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Harvests the resource from the tile the robot is currently standing on."
|
tooltip_text = "Harvests the resource from the tile the robot is currently standing on."
|
||||||
text = "Harvest"
|
text = "Harvest"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
+17
-1
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_ygi5c"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_ygi5c"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_a5cwv"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_a5cwv"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="If" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="If" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -38,9 +40,21 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=479938935]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=479938935]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_a5cwv")
|
texture_normal = ExtResource("2_a5cwv")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=149543652]
|
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=149543652]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
@@ -80,3 +94,5 @@ tooltip_text = "Allows branching in the code with a condition based on item in y
|
|||||||
text = "If"
|
text = "If"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_maintain"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_maintain"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_trash"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_trash"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="Maintain" type="PanelContainer" unique_id=346305609 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Maintain" type="PanelContainer" unique_id=346305609 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -35,12 +37,26 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=1753994239]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=1753994239]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_trash")
|
texture_normal = ExtResource("2_trash")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="ListDisplay" type="Button" parent="." unique_id=991375625]
|
[node name="ListDisplay" type="Button" parent="." unique_id=991375625]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Repairs the robot by 10% and consumes one matching gear."
|
tooltip_text = "Repairs the robot by 10% and consumes one matching gear."
|
||||||
text = "Maintain"
|
text = "Maintain"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_mexpj"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_mexpj"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_5ujwv"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_5ujwv"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="Move" type="PanelContainer" unique_id=1474470717 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Move" type="PanelContainer" unique_id=1474470717 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -38,9 +40,21 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=753598237]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=753598237]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_5ujwv")
|
texture_normal = ExtResource("2_5ujwv")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=1288550105]
|
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=1288550105]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
@@ -72,3 +86,5 @@ tooltip_text = "Moves the robot to the selected coordinate"
|
|||||||
text = "Move"
|
text = "Move"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_sacrifice"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_sacrifice"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_trash"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_trash"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="Sacrifice" type="PanelContainer" unique_id=442348941 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Sacrifice" type="PanelContainer" unique_id=442348941 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -35,12 +37,26 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=1813377435]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=1813377435]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_trash")
|
texture_normal = ExtResource("2_trash")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="ListDisplay" type="Button" parent="." unique_id=2140824916]
|
[node name="ListDisplay" type="Button" parent="." unique_id=2140824916]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Sacrifices the robot and makes the resource on this tile endless."
|
tooltip_text = "Sacrifices the robot and makes the resource on this tile endless."
|
||||||
text = "Sacrifice"
|
text = "Sacrifice"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_kmf0m"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_kmf0m"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_71nn3"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_71nn3"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="Craft" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="Craft" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -35,9 +37,21 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=479938935]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/HBoxContainer" unique_id=479938935]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_71nn3")
|
texture_normal = ExtResource("2_71nn3")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="ListDisplay" type="Button" parent="." unique_id=200731038]
|
[node name="ListDisplay" type="Button" parent="." unique_id=200731038]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -45,3 +59,5 @@ tooltip_text = "Stops any while- or for-loop and returns to their node position.
|
|||||||
text = "Until"
|
text = "Until"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_q0rc7"]
|
[ext_resource type="Script" uid="uid://b6kxwmuhmruul" path="res://Scripts/UI/DSL/NodeDisplay.cs" id="1_q0rc7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_yhncq"]
|
[ext_resource type="Texture2D" uid="uid://wq8yc0u0ee33" path="res://Assets/Images/TrashSymbol.png" id="2_yhncq"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djxwweinn5c4i" path="res://Assets/Images/ArrowUp.png" id="3_arrow_up"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://66yiv4g7kfpv" path="res://Assets/Images/ArrowDown.png" id="4_arrow_down"]
|
||||||
|
|
||||||
[node name="While" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
[node name="While" type="PanelContainer" unique_id=247502695 node_paths=PackedStringArray("editorDisplay", "listDisplay")]
|
||||||
anchors_preset = 14
|
anchors_preset = 14
|
||||||
@@ -38,9 +40,21 @@ vertical_alignment = 1
|
|||||||
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=479938935]
|
[node name="TextureButton" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer" unique_id=479938935]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_stretch_ratio = 0.2
|
size_flags_stretch_ratio = 0.1
|
||||||
texture_normal = ExtResource("2_yhncq")
|
texture_normal = ExtResource("2_yhncq")
|
||||||
|
|
||||||
|
[node name="MoveUp" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("3_arrow_up")
|
||||||
|
|
||||||
|
[node name="MoveDown" type="TextureButton" parent="EditorDisplay/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_stretch_ratio = 0.1
|
||||||
|
texture_normal = ExtResource("4_arrow_down")
|
||||||
|
|
||||||
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=945032897]
|
[node name="Values" type="HBoxContainer" parent="EditorDisplay/VBoxContainer" unique_id=945032897]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
@@ -80,3 +94,5 @@ tooltip_text = "Allows repetition in the code with a condition based on item in
|
|||||||
text = "While"
|
text = "While"
|
||||||
|
|
||||||
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/TextureButton" to="." method="DeleteNodePressed"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/MoveUp" to="." method="MoveNodeUp"]
|
||||||
|
[connection signal="pressed" from="EditorDisplay/VBoxContainer/HBoxContainer/MoveDown" to="." method="MoveNodeDown"]
|
||||||
|
|||||||
@@ -192,7 +192,6 @@ public partial class UIHandler : Control
|
|||||||
|
|
||||||
receivedRobotFollowSignal = true;
|
receivedRobotFollowSignal = true;
|
||||||
mainCam.Follow(robot);
|
mainCam.Follow(robot);
|
||||||
OpenUIElement(codingWindow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisplaySurvivalStats()
|
private void DisplaySurvivalStats()
|
||||||
|
|||||||
@@ -87,6 +87,15 @@ public partial class CodingWindow : PanelContainer
|
|||||||
editorWindow.RemoveChild(editorDisplay);
|
editorWindow.RemoveChild(editorDisplay);
|
||||||
editorDisplay.QueueFree();
|
editorDisplay.QueueFree();
|
||||||
};
|
};
|
||||||
|
editorDisplay.OnMoveNode += (int direction) =>
|
||||||
|
{
|
||||||
|
int targetIndex = Mathf.Clamp(
|
||||||
|
editorDisplay.GetIndex() + direction,
|
||||||
|
0,
|
||||||
|
editorWindow.GetChildCount() - 1
|
||||||
|
);
|
||||||
|
editorWindow.MoveChild(editorDisplay, targetIndex);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClearWindow()
|
public void ClearWindow()
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
public partial class NodeDisplay : PanelContainer
|
public partial class NodeDisplay : PanelContainer
|
||||||
{
|
{
|
||||||
[Export] PanelContainer editorDisplay;
|
[Export] PanelContainer editorDisplay;
|
||||||
@@ -10,6 +9,8 @@ public partial class NodeDisplay : PanelContainer
|
|||||||
|
|
||||||
[Signal]
|
[Signal]
|
||||||
public delegate void OnDeleteNodeEventHandler();
|
public delegate void OnDeleteNodeEventHandler();
|
||||||
|
[Signal]
|
||||||
|
public delegate void OnMoveNodeEventHandler(int direction);
|
||||||
|
|
||||||
public void SetNode(ProgramNode node)
|
public void SetNode(ProgramNode node)
|
||||||
{
|
{
|
||||||
@@ -217,4 +218,14 @@ public partial class NodeDisplay : PanelContainer
|
|||||||
string amountString = parts[2].Replace("Amount:", "").Trim();
|
string amountString = parts[2].Replace("Amount:", "").Trim();
|
||||||
valueContainer.GetNode<SpinBox>("./Amount").Value = int.Parse(amountString);
|
valueContainer.GetNode<SpinBox>("./Amount").Value = int.Parse(amountString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void MoveNodeUp()
|
||||||
|
{
|
||||||
|
EmitSignal(SignalName.OnMoveNode, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void MoveNodeDown()
|
||||||
|
{
|
||||||
|
EmitSignal(SignalName.OnMoveNode, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user