set selected file on sln explorer click
This commit is contained in:
@@ -38,6 +38,7 @@ public partial class IdeRoot : Control
|
||||
_sharpIdeCodeEdit = GetNode<SharpIdeCodeEdit>("%SharpIdeCodeEdit");
|
||||
_fileDialog = GetNode<FileDialog>("%OpenSolutionDialog");
|
||||
_solutionExplorerPanel = GetNode<SolutionExplorerPanel>("%SolutionExplorerPanel");
|
||||
_solutionExplorerPanel.FileSelected += OnSolutionExplorerPanelOnFileSelected;
|
||||
_fileDialog.FileSelected += OnFileSelected;
|
||||
_runPanel = GetNode<RunPanel>("%RunPanel");
|
||||
_openSlnButton.Pressed += () => _fileDialog.Visible = true;
|
||||
@@ -45,6 +46,11 @@ public partial class IdeRoot : Control
|
||||
OnFileSelected(@"C:\Users\Matthew\Documents\Git\BlazorCodeBreaker\BlazorCodeBreaker.slnx");
|
||||
}
|
||||
|
||||
private async void OnSolutionExplorerPanelOnFileSelected(SharpIdeFileGodotContainer file)
|
||||
{
|
||||
await _sharpIdeCodeEdit.SetSharpIdeFile(file.File);
|
||||
}
|
||||
|
||||
private void OnFileSelected(string path)
|
||||
{
|
||||
_ = GodotTask.Run(async () =>
|
||||
|
||||
Reference in New Issue
Block a user