create BuildPanel scene

This commit is contained in:
Matt Parker
2025-08-27 20:43:13 +10:00
parent 71dd132213
commit a00f5a414b
6 changed files with 79 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ namespace SharpIDE.Godot;
public partial class IdeRoot : Control
{
private Button _openSlnButton = null!;
private Button _buildSlnButton = null!;
private FileDialog _fileDialog = null!;
private SharpIdeCodeEdit _sharpIdeCodeEdit = null!;
private SolutionExplorerPanel _solutionExplorerPanel = null!;
@@ -25,6 +26,7 @@ public partial class IdeRoot : Control
MSBuildLocator.RegisterDefaults();
_openSlnButton = GetNode<Button>("%OpenSlnButton");
_buildSlnButton = GetNode<Button>("%BuildSlnButton");
_runMenuPopup = GetNode<Popup>("%RunMenuPopup");
_runMenuButton = GetNode<Button>("%RunMenuButton");
_runMenuButton.Pressed += () =>
@@ -42,10 +44,15 @@ public partial class IdeRoot : Control
_fileDialog.FileSelected += OnFileSelected;
_runPanel = GetNode<RunPanel>("%RunPanel");
_openSlnButton.Pressed += () => _fileDialog.Visible = true;
//_fileDialog.Visible = true;
_buildSlnButton.Pressed += OnBuildSlnButtonPressed;
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)
{
await _sharpIdeCodeEdit.SetSharpIdeFile(file.File);