search modal v1

This commit is contained in:
Matt Parker
2025-09-23 22:08:35 +10:00
parent dd06686f16
commit 6a95ea892c
7 changed files with 101 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ using SharpIDE.Godot.Features.BottomPanel;
using SharpIDE.Godot.Features.CodeEditor;
using SharpIDE.Godot.Features.CustomControls;
using SharpIDE.Godot.Features.Run;
using SharpIDE.Godot.Features.Search;
using SharpIDE.Godot.Features.SolutionExplorer;
namespace SharpIDE.Godot;
@@ -16,6 +17,7 @@ public partial class IdeRoot : Control
private Button _openSlnButton = null!;
private Button _buildSlnButton = null!;
private FileDialog _fileDialog = null!;
private SearchWindow _searchWindow = null!;
private CodeEditorPanel _codeEditorPanel = null!;
private SolutionExplorerPanel _solutionExplorerPanel = null!;
private InvertedVSplitContainer _invertedVSplitContainer = null!;
@@ -35,6 +37,7 @@ public partial class IdeRoot : Control
_runMenuButton = GetNode<Button>("%RunMenuButton");
_codeEditorPanel = GetNode<CodeEditorPanel>("%CodeEditorPanel");
_fileDialog = GetNode<FileDialog>("%OpenSolutionDialog");
_searchWindow = GetNode<SearchWindow>("%SearchWindow");
_solutionExplorerPanel = GetNode<SolutionExplorerPanel>("%SolutionExplorerPanel");
_runPanel = GetNode<RunPanel>("%RunPanel");
_invertedVSplitContainer = GetNode<InvertedVSplitContainer>("%InvertedVSplitContainer");
@@ -103,4 +106,12 @@ public partial class IdeRoot : Control
//await this.InvokeAsync(() => _runPanel.NewRunStarted(runnableProject));
});
}
public override void _UnhandledKeyInput(InputEvent @event)
{
if (@event.IsActionPressed(InputStringNames.FindInFiles))
{
_searchWindow.Popup();
}
}
}