Skip to content

Commit 091bc3e

Browse files
Merge pull request #218 from Tweety-Lab/isolated-changes
Add Drive selection to `FileDialog`.
2 parents 914d0c6 + 056aa33 commit 091bc3e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Prowl.Editor/Editor/Widgets/FileDialog.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected override void Draw()
102102
{
103103
using (gui.Node("Sidebar").Layout(LayoutType.Column).ExpandHeight().MaxWidth(125).PaddingRight(10).Padding(10).Enter())
104104
{
105-
gui.Draw2D.DrawRectFilled(gui.CurrentNode.LayoutData.Rect, EditorStylePrefs.Instance.Borders, (float)EditorStylePrefs.Instance.WindowRoundness);
105+
gui.Draw2D.DrawRectFilled(gui.CurrentNode.LayoutData.Rect, EditorStylePrefs.Instance.Borders * 0.85f, (float)EditorStylePrefs.Instance.WindowRoundness);
106106

107107
string userProf = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
108108

@@ -112,6 +112,13 @@ protected override void Draw()
112112
ShortcutOption("Pictures", Environment.GetFolderPath(Environment.SpecialFolder.MyPictures, Environment.SpecialFolderOption.Create));
113113
ShortcutOption("Music", Environment.GetFolderPath(Environment.SpecialFolder.MyMusic, Environment.SpecialFolderOption.Create));
114114
ShortcutOption("Videos", Environment.GetFolderPath(Environment.SpecialFolder.MyVideos, Environment.SpecialFolderOption.Create));
115+
116+
EditorGUI.Separator();
117+
118+
// Add all available drives
119+
foreach (DriveInfo drive in DriveInfo.GetDrives())
120+
if (drive.IsReady)
121+
ShortcutOption(drive.Name.TrimEnd(Path.DirectorySeparatorChar), drive.Name);
115122
}
116123

117124
using (gui.Node("Window").ExpandHeight().Enter())

0 commit comments

Comments
 (0)