Finished first EA Version #1

Merged
Nicola merged 110 commits from dev into main 2026-05-19 20:01:13 +02:00
31 changed files with 528 additions and 23 deletions
Showing only changes of commit 588879951d - Show all commits
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bjxwrtm0bttio"
path="res://.godot/imported/craft.png-6ef1d3b3d2b282380072caa5b7edf88e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/craft.png"
dest_files=["res://.godot/imported/craft.png-6ef1d3b3d2b282380072caa5b7edf88e.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: 4.1 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b6jm34qgckaxh"
path="res://.godot/imported/explore.png-953528913d382d25c22ebda01c9eae17.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/explore.png"
dest_files=["res://.godot/imported/explore.png-953528913d382d25c22ebda01c9eae17.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: 9.3 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cugoibldkatry"
path="res://.godot/imported/for.png-7e0a93012248eea32dfb05f41c7e4f81.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/for.png"
dest_files=["res://.godot/imported/for.png-7e0a93012248eea32dfb05f41c7e4f81.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: 4.1 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://qqtpqludvgxt"
path="res://.godot/imported/harvest.png-0cc3bd3c70f996a004117a3f7a91177a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/harvest.png"
dest_files=["res://.godot/imported/harvest.png-0cc3bd3c70f996a004117a3f7a91177a.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: 9.2 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://chh5hsjsy254n"
path="res://.godot/imported/if.png-4751c8cb00c015bf90caf7b01ca65fcf.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/if.png"
dest_files=["res://.godot/imported/if.png-4751c8cb00c015bf90caf7b01ca65fcf.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: 4.2 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://0yysypsrfe7s"
path="res://.godot/imported/maintain.png-d6e014a306fabbb6543e072f6642d4e7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/maintain.png"
dest_files=["res://.godot/imported/maintain.png-d6e014a306fabbb6543e072f6642d4e7.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: 8.2 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwen2run626at"
path="res://.godot/imported/move.png-0fbfb070f028e7a2665763914c1c70f0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/move.png"
dest_files=["res://.godot/imported/move.png-0fbfb070f028e7a2665763914c1c70f0.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: 4.3 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://btumhi0t4c0f0"
path="res://.godot/imported/sacrifice.png-1291ff8e1d4c6a2ccf4900842ccf4993.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/sacrifice.png"
dest_files=["res://.godot/imported/sacrifice.png-1291ff8e1d4c6a2ccf4900842ccf4993.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: 3.5 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cktnj1a1rg5yu"
path="res://.godot/imported/start.png-edc6bdb9e8290898275934ddb44d2834.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/start.png"
dest_files=["res://.godot/imported/start.png-edc6bdb9e8290898275934ddb44d2834.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: 11 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://p0b5h6kts0jo"
path="res://.godot/imported/while.png-a59b08af0a24cbfedd7a46b9cd582957.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Images/Nodes/while.png"
dest_files=["res://.godot/imported/while.png-a59b08af0a24cbfedd7a46b9cd582957.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
+45 -4
View File
@@ -24,6 +24,8 @@
[ext_resource type="Texture2D" uid="uid://bmcpkt6mae2qi" path="res://Assets/Images/AlarmSign.png" id="13_x3xnh"]
[ext_resource type="Texture2D" uid="uid://uunnuou4g86w" path="res://Assets/Images/Resources/MushroomSymbol.png" id="14_food"]
[ext_resource type="Script" uid="uid://d0opysuqksr6l" path="res://Scripts/UI/Tutorial/TutorialBubble.cs" id="15_tutorial"]
[ext_resource type="Texture2D" uid="uid://b6jm34qgckaxh" path="res://Assets/Images/Nodes/explore.png" id="25_8e0uq"]
[ext_resource type="Script" uid="uid://dx5oy38ochrw2" path="res://Scripts/UI/DSL/NodeTooltip.cs" id="25_i0vto"]
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_u44n3"]
@@ -224,14 +226,14 @@ text = "Open Gate"
layout_mode = 2
size_flags_vertical = 3
[node name="CodingWindow" type="PanelContainer" parent="CanvasLayer/UIHandler/MainUI/Content" unique_id=1576652491 node_paths=PackedStringArray("codeBlocks", "editorWindow", "availableScripts", "scriptName", "nameInput")]
[node name="CodingWindow" type="PanelContainer" parent="CanvasLayer/UIHandler/MainUI/Content" unique_id=1576652491 node_paths=PackedStringArray("codeBlocks", "editorWindow", "availableScripts", "scriptName", "nameInput", "nodeTooltip")]
visible = false
layout_mode = 1
anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -663.0
offset_left = -948.0
grow_horizontal = 0
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_7lihs")
@@ -241,6 +243,7 @@ editorWindow = NodePath("VBoxContainer/Scripting/EditorWindow/CodeContainer")
availableScripts = NodePath("VBoxContainer/Scripting/EditorWindow/Load")
scriptName = NodePath("VBoxContainer/Scripting/EditorWindow/Saving/ScriptName")
nameInput = NodePath("VBoxContainer/Renaming/LineEdit")
nodeTooltip = NodePath("../../../NodeTooltip")
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" unique_id=582741975]
layout_mode = 2
@@ -296,7 +299,8 @@ theme_override_constants/separation = 10
[node name="RichTextLabel" type="RichTextLabel" parent="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/CodeBlocks/VBoxContainer" unique_id=1914788051]
layout_mode = 2
text = "Click to add"
text = "Click to add
[DEL] to remove"
fit_content = true
autowrap_mode = 0
horizontal_alignment = 1
@@ -310,6 +314,7 @@ size_flags_stretch_ratio = 2.0
[node name="CodeContainer" type="GraphEdit" parent="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow" unique_id=1600198848]
layout_mode = 2
size_flags_vertical = 3
scroll_offset = Vector2(-4, 0)
right_disconnects = true
[node name="Buttons" type="HBoxContainer" parent="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow" unique_id=265797151]
@@ -361,7 +366,7 @@ anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -525.0
offset_left = -711.0
grow_horizontal = 0
grow_vertical = 2
script = ExtResource("7_2irst")
@@ -691,10 +696,46 @@ text = "Skip"
layout_mode = 2
text = "Next"
[node name="NodeTooltip" type="PanelContainer" parent="CanvasLayer/UIHandler" unique_id=642635777 node_paths=PackedStringArray("title", "image", "description")]
visible = false
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("25_i0vto")
title = NodePath("VBoxContainer/Title")
image = NodePath("VBoxContainer/NodeVisual")
description = NodePath("VBoxContainer/Description")
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/UIHandler/NodeTooltip" unique_id=1125936946]
layout_mode = 2
[node name="Title" type="RichTextLabel" parent="CanvasLayer/UIHandler/NodeTooltip/VBoxContainer" unique_id=1945362386]
layout_mode = 2
bbcode_enabled = true
text = "[font_size=18]Explore"
fit_content = true
autowrap_mode = 0
horizontal_alignment = 1
vertical_alignment = 1
[node name="NodeVisual" type="TextureRect" parent="CanvasLayer/UIHandler/NodeTooltip/VBoxContainer" unique_id=2114186555]
layout_mode = 2
texture = ExtResource("25_8e0uq")
[node name="Description" type="RichTextLabel" parent="CanvasLayer/UIHandler/NodeTooltip/VBoxContainer" unique_id=1191195331]
layout_mode = 2
text = "Using this node you can randomly explore the ruin.
It continues exploring until all tiles were visited."
fit_content = true
horizontal_alignment = 1
vertical_alignment = 1
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/HeaderContainer/VBoxContainer/UnlockLayer" to="CanvasLayer/UIHandler" method="UnlockLayer"]
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Renaming/Button" to="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" method="SaveRobotName"]
[connection signal="connection_request" from="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow/CodeContainer" to="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" method="OnNodeConnect"]
[connection signal="disconnection_request" from="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow/CodeContainer" to="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" method="OnNodeDisconnect"]
[connection signal="node_deselected" from="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow/CodeContainer" to="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" method="OnNodeDeselect"]
[connection signal="node_selected" from="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow/CodeContainer" to="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" method="OnNodeSelect"]
[connection signal="button_up" from="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow/Buttons/Clear" to="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" method="ClearWindow"]
[connection signal="button_up" from="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow/Buttons/Compile" to="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" method="CompileProgram"]
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/Content/CodingWindow/VBoxContainer/Scripting/EditorWindow/Saving/Save" to="CanvasLayer/UIHandler/MainUI/Content/CodingWindow" method="SaveProgram"]
+5
View File
@@ -151,4 +151,9 @@ public static class ResourceLoader
return result;
}
public static Texture2D LoadDSLTooltip(string title)
{
return GD.Load<Texture2D>($"res://Assets/Images/Nodes/{title.ToLower()}.png");
}
}
+6
View File
@@ -19,6 +19,12 @@ public class IfNode : ProgramNode
return NodeResult.FAILURE;
}
if (comparator == null)
{
lastExecutionMessage = "No comparator selected";
return NodeResult.FAILURE;
}
bool isConditionFulfilled = DetermineCondition();
return isConditionFulfilled ? NodeResult.SUCCESS : NodeResult.CONDITIONFALSE;
}
+6
View File
@@ -19,6 +19,12 @@ public class WhileNode : ProgramNode
return NodeResult.FAILURE;
}
if (comparator == null)
{
lastExecutionMessage = "No comparator selected";
return NodeResult.FAILURE;
}
bool isConditionFulfilled = DetermineCondition();
return isConditionFulfilled ? NodeResult.SUCCESS : NodeResult.CONDITIONFALSE;
}
+33 -11
View File
@@ -11,8 +11,10 @@ public partial class CodingWindow : PanelContainer
[Export] OptionButton availableScripts;
[Export] LineEdit scriptName;
[Export] LineEdit nameInput;
[Export] NodeTooltip nodeTooltip;
public System.Collections.Generic.Dictionary<ProgramNode, PackedScene> DSLNodes;
public NodeDisplay selectedNode;
public override void _Ready()
{
@@ -28,6 +30,29 @@ public partial class CodingWindow : PanelContainer
}
}
public override void _Process(double delta)
{
if (Input.IsActionJustPressed("delete_node"))
{
Control focused = GetViewport().GuiGetFocusOwner();
if (focused is LineEdit || focused is TextEdit) return;
if (selectedNode == null) return;
editorWindow.RemoveChild(selectedNode);
selectedNode.QueueFree();
}
}
public void OnNodeSelect(NodeDisplay node)
{
selectedNode = node;
}
public void OnNodeDeselect(NodeDisplay node)
{
selectedNode = null;
}
private void LoadWindow()
{
if (robot == null) return;
@@ -76,6 +101,14 @@ public partial class CodingWindow : PanelContainer
{
AddEditorNode(nodeTemplate);
};
nodeListButton.MouseEntered += () =>
{
nodeTooltip.ShowTooltip(nodeTemplate.DisplayText, nodeTemplate.DisplayText, nodeListButton);
};
nodeListButton.MouseExited += () =>
{
nodeTooltip.HideTooltip();
};
codeBlocks.AddChild(nodeListButton);
}
}
@@ -85,7 +118,6 @@ public partial class CodingWindow : PanelContainer
NodeDisplay editorDisplay = DSLNodes[node].Instantiate<NodeDisplay>();
editorDisplay.PositionOffset = GetVisibleGraphCenter() - editorDisplay.Size / 2f;
editorWindow.AddChild(editorDisplay);
RegisterEditorNode(editorDisplay);
}
private Vector2 GetVisibleGraphCenter()
@@ -93,15 +125,6 @@ public partial class CodingWindow : PanelContainer
return (editorWindow.ScrollOffset + editorWindow.Size / 2f) / editorWindow.Zoom;
}
private void RegisterEditorNode(NodeDisplay editorDisplay)
{
editorDisplay.OnDeleteNode += () =>
{
editorWindow.RemoveChild(editorDisplay);
editorDisplay.QueueFree();
};
}
public void ClearWindow()
{
DisconnectAllNodes();
@@ -176,7 +199,6 @@ public partial class CodingWindow : PanelContainer
private void AddLoadedNode(NodeDisplay nodeDisplay)
{
editorWindow.AddChild(nodeDisplay);
RegisterEditorNode(nodeDisplay);
}
public void LoadTemporaryProgram()
-8
View File
@@ -5,9 +5,6 @@ public partial class NodeDisplay : GraphNode
{
public ProgramNode node;
[Signal]
public delegate void OnDeleteNodeEventHandler();
public override void _Ready()
{
if (node == null)
@@ -20,11 +17,6 @@ public partial class NodeDisplay : GraphNode
SetupDisplay();
}
public void DeleteNodePressed()
{
EmitSignal(SignalName.OnDeleteNode);
}
public static NodeDisplay Load(
string nodeName,
string content,
@@ -41,6 +41,7 @@ public partial class IfNodeDisplay : NodeDisplay
ifNode.amount = (int)valueContainer.GetNode<SpinBox>("./Amount").Value;
OptionButton comparators = valueContainer.GetNode<OptionButton>("./Comparator");
if(comparators.GetSelectedId() == -1) return;
ifNode.comparator = comparators.GetItemText(comparators.GetSelectedId());
}
@@ -41,6 +41,7 @@ public partial class WhileNodeDisplay : NodeDisplay
whileNode.amount = (int)valueContainer.GetNode<SpinBox>("./Amount").Value;
OptionButton comparators = valueContainer.GetNode<OptionButton>("./Comparator");
if(comparators.GetSelectedId() == -1) return;
whileNode.comparator = comparators.GetItemText(comparators.GetSelectedId());
}
+24
View File
@@ -0,0 +1,24 @@
using Godot;
public partial class NodeTooltip : PanelContainer
{
[Export] RichTextLabel title;
[Export] TextureRect image;
[Export] RichTextLabel description;
private static Vector2 spacing = new Vector2(5, 0);
public void ShowTooltip(string titleText, string descriptionText, Button button)
{
title.Text = titleText;
image.Texture = ResourceLoader.LoadDSLTooltip(titleText);
description.Text = descriptionText;
Show();
Position = button.GlobalPosition - spacing - new Vector2(Size.X, Size.Y/2);
}
public void HideTooltip()
{
Hide();
}
}
+1
View File
@@ -0,0 +1 @@
uid://dx5oy38ochrw2
+6
View File
@@ -97,6 +97,12 @@ research={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":84,"key_label":0,"unicode":116,"location":0,"echo":false,"script":null)
]
}
delete_node={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194308,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194312,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[layer_names]