Automatically focus name textbox upon add preset popover open

This commit is contained in:
Bartłomiej Dach 2022-08-03 21:26:35 +02:00
parent 159d3b032c
commit ca1b4689cb
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -84,6 +84,13 @@ namespace osu.Game.Overlays.Mods
createButton.TextColour = colourProvider.Background6;
}
protected override void LoadComplete()
{
base.LoadComplete();
ScheduleAfterChildren(() => GetContainingInputManager().ChangeFocus(nameTextBox));
}
private void tryCreatePreset()
{
if (string.IsNullOrWhiteSpace(nameTextBox.Current.Value))