diff --git a/osu.Game/Screens/Select/SearchTextBox.cs b/osu.Game/Screens/Select/SearchTextBox.cs index a96209d0d8..a583def51c 100644 --- a/osu.Game/Screens/Select/SearchTextBox.cs +++ b/osu.Game/Screens/Select/SearchTextBox.cs @@ -16,6 +16,9 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Screens.Select { + /// + /// A textbox which holds focus eagerly. + /// public class SearchTextBox : OsuTextBox { protected override Color4 BackgroundUnfocused => new Color4(10, 10, 10, 255); @@ -34,6 +37,8 @@ namespace osu.Game.Screens.Select } } + public override bool RequestingFocus => HoldFocus; + public SearchTextBox() { Height = 35; @@ -51,12 +56,6 @@ namespace osu.Game.Screens.Select PlaceholderText = "type to search"; } - protected override void Update() - { - if (HoldFocus) RequestFocus(); - base.Update(); - } - protected override bool OnFocus(InputState state) { var result = base.OnFocus(state);