create BuildPanel scene
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace SharpIDE.Godot.Features.BottomPanel;
|
||||||
|
|
||||||
|
public partial class BottomPanelManager : Panel
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cvvgp42r3nml8
|
||||||
42
src/SharpIDE.Godot/Features/Build/BuildPanel.tscn
Normal file
42
src/SharpIDE.Godot/Features/Build/BuildPanel.tscn
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
[gd_scene format=3 uid="uid://co6dkhdolriej"]
|
||||||
|
|
||||||
|
[node name="BuildPanel" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[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="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Build"
|
||||||
|
|
||||||
|
[node name="TerminalContainer" type="Control" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="Terminal" type="Terminal" parent="VBoxContainer/TerminalContainer"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
@@ -12,6 +12,7 @@ namespace SharpIDE.Godot;
|
|||||||
public partial class IdeRoot : Control
|
public partial class IdeRoot : Control
|
||||||
{
|
{
|
||||||
private Button _openSlnButton = null!;
|
private Button _openSlnButton = null!;
|
||||||
|
private Button _buildSlnButton = null!;
|
||||||
private FileDialog _fileDialog = null!;
|
private FileDialog _fileDialog = null!;
|
||||||
private SharpIdeCodeEdit _sharpIdeCodeEdit = null!;
|
private SharpIdeCodeEdit _sharpIdeCodeEdit = null!;
|
||||||
private SolutionExplorerPanel _solutionExplorerPanel = null!;
|
private SolutionExplorerPanel _solutionExplorerPanel = null!;
|
||||||
@@ -25,6 +26,7 @@ public partial class IdeRoot : Control
|
|||||||
MSBuildLocator.RegisterDefaults();
|
MSBuildLocator.RegisterDefaults();
|
||||||
|
|
||||||
_openSlnButton = GetNode<Button>("%OpenSlnButton");
|
_openSlnButton = GetNode<Button>("%OpenSlnButton");
|
||||||
|
_buildSlnButton = GetNode<Button>("%BuildSlnButton");
|
||||||
_runMenuPopup = GetNode<Popup>("%RunMenuPopup");
|
_runMenuPopup = GetNode<Popup>("%RunMenuPopup");
|
||||||
_runMenuButton = GetNode<Button>("%RunMenuButton");
|
_runMenuButton = GetNode<Button>("%RunMenuButton");
|
||||||
_runMenuButton.Pressed += () =>
|
_runMenuButton.Pressed += () =>
|
||||||
@@ -42,10 +44,15 @@ public partial class IdeRoot : Control
|
|||||||
_fileDialog.FileSelected += OnFileSelected;
|
_fileDialog.FileSelected += OnFileSelected;
|
||||||
_runPanel = GetNode<RunPanel>("%RunPanel");
|
_runPanel = GetNode<RunPanel>("%RunPanel");
|
||||||
_openSlnButton.Pressed += () => _fileDialog.Visible = true;
|
_openSlnButton.Pressed += () => _fileDialog.Visible = true;
|
||||||
//_fileDialog.Visible = true;
|
_buildSlnButton.Pressed += OnBuildSlnButtonPressed;
|
||||||
OnFileSelected(@"C:\Users\Matthew\Documents\Git\BlazorCodeBreaker\BlazorCodeBreaker.slnx");
|
OnFileSelected(@"C:\Users\Matthew\Documents\Git\BlazorCodeBreaker\BlazorCodeBreaker.slnx");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void OnBuildSlnButtonPressed()
|
||||||
|
{
|
||||||
|
await Singletons.BuildService.MsBuildSolutionAsync(_solutionExplorerPanel.SolutionModel.FilePath);
|
||||||
|
}
|
||||||
|
|
||||||
private async void OnSolutionExplorerPanelOnFileSelected(SharpIdeFileGodotContainer file)
|
private async void OnSolutionExplorerPanelOnFileSelected(SharpIdeFileGodotContainer file)
|
||||||
{
|
{
|
||||||
await _sharpIdeCodeEdit.SetSharpIdeFile(file.File);
|
await _sharpIdeCodeEdit.SetSharpIdeFile(file.File);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=9 format=3 uid="uid://b2oniigcp5ew5"]
|
[gd_scene load_steps=11 format=3 uid="uid://b2oniigcp5ew5"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bavypuy7b375x" path="res://IdeRoot.cs" id="1_whawi"]
|
[ext_resource type="Script" uid="uid://bavypuy7b375x" path="res://IdeRoot.cs" id="1_whawi"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bkty6563cthj8" path="res://Features/Run/Resources/Run.svg" id="2_8x8ub"]
|
[ext_resource type="Texture2D" uid="uid://bkty6563cthj8" path="res://Features/Run/Resources/Run.svg" id="2_8x8ub"]
|
||||||
@@ -7,6 +7,8 @@
|
|||||||
[ext_resource type="Script" uid="uid://bai53k7ongbxw" path="res://Features/SolutionExplorer/SolutionExplorerPanel.cs" id="2_tcy02"]
|
[ext_resource type="Script" uid="uid://bai53k7ongbxw" path="res://Features/SolutionExplorer/SolutionExplorerPanel.cs" id="2_tcy02"]
|
||||||
[ext_resource type="Script" uid="uid://kvnhndc3l6ih" path="res://Features/CustomControls/InvertedVSplitContainer.cs" id="3_0ybuf"]
|
[ext_resource type="Script" uid="uid://kvnhndc3l6ih" path="res://Features/CustomControls/InvertedVSplitContainer.cs" id="3_0ybuf"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bcoytt3bw0gpe" path="res://Features/Run/RunPanel.tscn" id="5_y3aoi"]
|
[ext_resource type="PackedScene" uid="uid://bcoytt3bw0gpe" path="res://Features/Run/RunPanel.tscn" id="5_y3aoi"]
|
||||||
|
[ext_resource type="Script" uid="uid://cvvgp42r3nml8" path="res://Features/BottomPanel/BottomPanelManager.cs" id="7_i62lx"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://co6dkhdolriej" path="res://Features/Build/BuildPanel.tscn" id="9_rllbf"]
|
||||||
|
|
||||||
[sub_resource type="FontVariation" id="FontVariation_y3aoi"]
|
[sub_resource type="FontVariation" id="FontVariation_y3aoi"]
|
||||||
base_font = ExtResource("2_rk34b")
|
base_font = ExtResource("2_rk34b")
|
||||||
@@ -51,6 +53,13 @@ layout_mode = 2
|
|||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
text = "Open Sln"
|
text = "Open Sln"
|
||||||
|
|
||||||
|
[node name="BuildSlnButton" type="Button" parent="VBoxContainer/Panel/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 4
|
||||||
|
text = "Build
|
||||||
|
"
|
||||||
|
|
||||||
[node name="Spacer" type="Control" parent="VBoxContainer/Panel/HBoxContainer"]
|
[node name="Spacer" type="Control" parent="VBoxContainer/Panel/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
@@ -200,11 +209,16 @@ item_count = 1
|
|||||||
item_0/text = "Getting Context Actions..."
|
item_0/text = "Getting Context Actions..."
|
||||||
item_0/id = 0
|
item_0/id = 0
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="VBoxContainer/HBoxContainer/VSplitContainer"]
|
[node name="BottomPanel" type="Panel" parent="VBoxContainer/HBoxContainer/VSplitContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
script = ExtResource("7_i62lx")
|
||||||
|
|
||||||
[node name="RunPanel" parent="VBoxContainer/HBoxContainer/VSplitContainer/Panel" instance=ExtResource("5_y3aoi")]
|
[node name="RunPanel" parent="VBoxContainer/HBoxContainer/VSplitContainer/BottomPanel" instance=ExtResource("5_y3aoi")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 1
|
||||||
|
|
||||||
|
[node name="BuildPanel" parent="VBoxContainer/HBoxContainer/VSplitContainer/BottomPanel" instance=ExtResource("9_rllbf")]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
||||||
[node name="OpenSolutionDialog" type="FileDialog" parent="."]
|
[node name="OpenSolutionDialog" type="FileDialog" parent="."]
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using SharpIDE.Application.Features.Run;
|
using SharpIDE.Application.Features.Build;
|
||||||
|
using SharpIDE.Application.Features.Run;
|
||||||
|
|
||||||
namespace SharpIDE.Godot;
|
namespace SharpIDE.Godot;
|
||||||
|
|
||||||
public static class Singletons
|
public static class Singletons
|
||||||
{
|
{
|
||||||
public static RunService RunService { get; } = new RunService();
|
public static RunService RunService { get; } = new RunService();
|
||||||
|
public static BuildService BuildService { get; } = new BuildService();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user