diff --git a/src/SharpIDE.Godot/Features/Run/Play.png b/src/SharpIDE.Godot/Features/Run/Play.png new file mode 100644 index 0000000..586fd8d Binary files /dev/null and b/src/SharpIDE.Godot/Features/Run/Play.png differ diff --git a/src/SharpIDE.Godot/Features/Run/Play.png.import b/src/SharpIDE.Godot/Features/Run/Play.png.import new file mode 100644 index 0000000..78e2392 --- /dev/null +++ b/src/SharpIDE.Godot/Features/Run/Play.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bnprs1lvjyaji" +path="res://.godot/imported/Play.png-f33bbb4899ca2148d51910992d85a9eb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Features/Run/Play.png" +dest_files=["res://.godot/imported/Play.png-f33bbb4899ca2148d51910992d85a9eb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/src/SharpIDE.Godot/Features/Run/RunPanel.cs b/src/SharpIDE.Godot/Features/Run/RunPanel.cs new file mode 100644 index 0000000..0036fea --- /dev/null +++ b/src/SharpIDE.Godot/Features/Run/RunPanel.cs @@ -0,0 +1,33 @@ +using System.Collections.Generic; +using GDExtensionBindgen; +using Godot; +using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence; + +namespace SharpIDE.Godot.Features.Run; + +public partial class RunPanel : Control +{ + private Terminal _terminal = null!; + private TabBar _tabBar = null!; + private Panel _tabsPanel = null!; + public override void _Ready() + { + _tabBar = GetNode("%TabBar"); + _tabsPanel = GetNode("%TabsPanel"); + var test = GetNode("VBoxContainer/TabsPanel/Terminal"); + _terminal = new Terminal(test); + _terminal.Write("Hello from SharpIDE.Godot!\n"); + } + + public override void _Process(double delta) + { + //_terminal.Write("a"); + } + + public void NewRunStarted(SharpIdeProjectModel projectModel) + { + var terminal = new Terminal(); + _tabBar.AddTab(projectModel.Name); + _tabsPanel.AddChild(terminal); + } +} \ No newline at end of file diff --git a/src/SharpIDE.Godot/Features/Run/RunPanel.cs.uid b/src/SharpIDE.Godot/Features/Run/RunPanel.cs.uid new file mode 100644 index 0000000..796ded1 --- /dev/null +++ b/src/SharpIDE.Godot/Features/Run/RunPanel.cs.uid @@ -0,0 +1 @@ +uid://ddivigavjclyb diff --git a/src/SharpIDE.Godot/Features/Run/RunPanel.tscn b/src/SharpIDE.Godot/Features/Run/RunPanel.tscn new file mode 100644 index 0000000..5f0e4f8 --- /dev/null +++ b/src/SharpIDE.Godot/Features/Run/RunPanel.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=2 format=3 uid="uid://bcoytt3bw0gpe"] + +[ext_resource type="Script" uid="uid://ddivigavjclyb" path="res://Features/Run/RunPanel.cs" id="1_sq1l4"] + +[node name="RunPanel" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_sq1l4") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 0 + +[node name="TabBar" type="TabBar" parent="VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +current_tab = 0 +tab_close_display_policy = 2 +tab_count = 1 +tab_0/title = "WebApi" + +[node name="TabsPanel" type="Panel" parent="VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 3 + +[node name="Terminal" type="Terminal" parent="VBoxContainer/TabsPanel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 diff --git a/src/SharpIDE.Godot/GlobalUsings.cs b/src/SharpIDE.Godot/GlobalUsings.cs new file mode 100644 index 0000000..769e515 --- /dev/null +++ b/src/SharpIDE.Godot/GlobalUsings.cs @@ -0,0 +1 @@ +global using static SharpIDE.Godot.NodeExtensions; \ No newline at end of file diff --git a/src/SharpIDE.Godot/GlobalUsings.cs.uid b/src/SharpIDE.Godot/GlobalUsings.cs.uid new file mode 100644 index 0000000..c599f05 --- /dev/null +++ b/src/SharpIDE.Godot/GlobalUsings.cs.uid @@ -0,0 +1 @@ +uid://dv0ry6n8t1vb diff --git a/src/SharpIDE.Godot/IdeRoot.cs b/src/SharpIDE.Godot/IdeRoot.cs index 4fd6f1c..292e53e 100644 --- a/src/SharpIDE.Godot/IdeRoot.cs +++ b/src/SharpIDE.Godot/IdeRoot.cs @@ -1,11 +1,11 @@ using System; -using System.IO; using System.Linq; +using System.Threading.Tasks; using Godot; using Microsoft.Build.Locator; using SharpIDE.Application.Features.Analysis; -using SharpIDE.Application.Features.Debugging; using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence; +using SharpIDE.Godot.Features.Run; namespace SharpIDE.Godot; @@ -15,39 +15,62 @@ public partial class IdeRoot : Control private FileDialog _fileDialog = null!; private SharpIdeCodeEdit _sharpIdeCodeEdit = null!; private SolutionExplorerPanel _solutionExplorerPanel = null!; + private RunPanel _runPanel = null!; + private MenuButton _runMenuButton = null!; public override void _Ready() { MSBuildLocator.RegisterDefaults(); _openSlnButton = GetNode