From 056aa33302a96248160447a992ebd15422d1ec6f Mon Sep 17 00:00:00 2001 From: Tweety-lab <108560864+Tweety-lab@users.noreply.github.com> Date: Fri, 11 Jul 2025 21:43:40 +1000 Subject: [PATCH] Add Drive selection to `FileDialog`. --- Prowl.Editor/Editor/Widgets/FileDialog.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Prowl.Editor/Editor/Widgets/FileDialog.cs b/Prowl.Editor/Editor/Widgets/FileDialog.cs index 5cbef4d9..f6abfe7c 100644 --- a/Prowl.Editor/Editor/Widgets/FileDialog.cs +++ b/Prowl.Editor/Editor/Widgets/FileDialog.cs @@ -102,7 +102,7 @@ protected override void Draw() { using (gui.Node("Sidebar").Layout(LayoutType.Column).ExpandHeight().MaxWidth(125).PaddingRight(10).Padding(10).Enter()) { - gui.Draw2D.DrawRectFilled(gui.CurrentNode.LayoutData.Rect, EditorStylePrefs.Instance.Borders, (float)EditorStylePrefs.Instance.WindowRoundness); + gui.Draw2D.DrawRectFilled(gui.CurrentNode.LayoutData.Rect, EditorStylePrefs.Instance.Borders * 0.85f, (float)EditorStylePrefs.Instance.WindowRoundness); string userProf = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); @@ -112,6 +112,13 @@ protected override void Draw() ShortcutOption("Pictures", Environment.GetFolderPath(Environment.SpecialFolder.MyPictures, Environment.SpecialFolderOption.Create)); ShortcutOption("Music", Environment.GetFolderPath(Environment.SpecialFolder.MyMusic, Environment.SpecialFolderOption.Create)); ShortcutOption("Videos", Environment.GetFolderPath(Environment.SpecialFolder.MyVideos, Environment.SpecialFolderOption.Create)); + + EditorGUI.Separator(); + + // Add all available drives + foreach (DriveInfo drive in DriveInfo.GetDrives()) + if (drive.IsReady) + ShortcutOption(drive.Name.TrimEnd(Path.DirectorySeparatorChar), drive.Name); } using (gui.Node("Window").ExpandHeight().Enter())