1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 00:20:38 +08:00

Merge pull request #12271 from hbnrmx/filechooser-preselect-folder

Open editor file selector in the directory of the previous selection
This commit is contained in:
Dean Herbert
2021-04-03 14:31:19 +09:00
committed by GitHub
Unverified
2 changed files with 3 additions and 2 deletions
@@ -54,7 +54,7 @@ namespace osu.Game.Screens.Edit.Setup
{
FileSelector fileSelector;
Target.Child = fileSelector = new FileSelector(validFileExtensions: ResourcesSection.AudioExtensions)
Target.Child = fileSelector = new FileSelector(currentFile.Value?.DirectoryName, ResourcesSection.AudioExtensions)
{
RelativeSizeAxes = Axes.X,
Height = 400,
@@ -73,7 +73,8 @@ namespace osu.Game.Screens.Edit.Setup
audioTrackTextBox = new FileChooserLabelledTextBox
{
Label = "Audio Track",
Current = { Value = working.Value.Metadata.AudioFile ?? "Click to select a track" },
PlaceholderText = "Click to select a track",
Current = { Value = working.Value.Metadata.AudioFile },
Target = audioTrackFileChooserContainer,
TabbableContentContainer = this
},