mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 04:12:56 +08:00
Update autoselect implementation to work correctly with framework changes
This commit is contained in:
parent
8a68333425
commit
144006fbe8
@ -321,7 +321,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
Spacing = new Vector2(10),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
divisorTextBox = new OsuNumberBox
|
||||
divisorTextBox = new AutoSelectTextBox
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
PlaceholderText = "Beat divisor"
|
||||
@ -341,8 +341,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
base.LoadComplete();
|
||||
BeatDivisor.BindValueChanged(_ => updateState(), true);
|
||||
divisorTextBox.OnCommit += (_, _) => setPresetsFromTextBoxEntry();
|
||||
|
||||
divisorTextBox.SelectAll();
|
||||
}
|
||||
|
||||
private void setPresetsFromTextBoxEntry()
|
||||
@ -590,5 +588,16 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private partial class AutoSelectTextBox : OsuNumberBox
|
||||
{
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
GetContainingInputManager().ChangeFocus(this);
|
||||
SelectAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user