1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 22:57:42 +08:00

Add support for focusing intermediate slider-textbox component

This commit is contained in:
Salman Ahmed 2022-05-11 09:53:04 +03:00
parent f797514bce
commit 24432dffc4

View File

@ -7,6 +7,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Overlays.Settings;
@ -107,6 +108,14 @@ namespace osu.Game.Screens.Edit.Timing
Current.BindValueChanged(_ => updateState(), true);
}
public override bool AcceptsFocus => true;
protected override void OnFocus(FocusEvent e)
{
base.OnFocus(e);
GetContainingInputManager().ChangeFocus(textBox);
}
private void updateState()
{
if (Current.Value is T nonNullValue)