forked from Misaki/GhostEngine
Updating ProjectBrowser
This commit is contained in:
23
Ghost.Editor/View/Controls/ProjectBrowser.Menu.cs
Normal file
23
Ghost.Editor/View/Controls/ProjectBrowser.Menu.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Ghost.Editor.Core;
|
||||
|
||||
namespace Ghost.Editor.View.Controls;
|
||||
|
||||
internal partial class ProjectBrowser
|
||||
{
|
||||
[ContextMenuItem("project-browser", "Show in Explorer")]
|
||||
private static void ShowInExplorer()
|
||||
{
|
||||
var path = LastFocused?.ViewModel.CurrentDirectoryPath;
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo()
|
||||
{
|
||||
FileName = path,
|
||||
UseShellExecute = true,
|
||||
Verb = "open"
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user