1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-30 09:18:44 +08:00

Implement TabbableContentContainer for slider control

This commit is contained in:
Bartłomiej Dach 2024-09-18 11:32:55 +02:00
parent 093d9ab076
commit d506d8a150
No known key found for this signature in database
2 changed files with 18 additions and 2 deletions

View File

@ -78,7 +78,8 @@ namespace osu.Game.Tests.Visual.UserInterface
MaxValue = 10, MaxValue = 10,
Value = 5, Value = 5,
Precision = 0.1f, Precision = 0.1f,
} },
TabbableContentContainer = this,
}, },
new FormSliderBar<float> new FormSliderBar<float>
{ {
@ -91,6 +92,7 @@ namespace osu.Game.Tests.Visual.UserInterface
Precision = 0.1f, Precision = 0.1f,
}, },
Instantaneous = false, Instantaneous = false,
TabbableContentContainer = this,
}, },
}, },
}, },

View File

@ -48,6 +48,19 @@ namespace osu.Game.Graphics.UserInterfaceV2
} }
} }
private CompositeDrawable? tabbableContentContainer;
public CompositeDrawable? TabbableContentContainer
{
set
{
tabbableContentContainer = value;
if (textBox.IsNotNull())
textBox.TabbableContentContainer = tabbableContentContainer;
}
}
private readonly BindableNumberWithCurrent<T> current = new BindableNumberWithCurrent<T>(); private readonly BindableNumberWithCurrent<T> current = new BindableNumberWithCurrent<T>();
/// <summary> /// <summary>
@ -117,7 +130,8 @@ namespace osu.Game.Graphics.UserInterfaceV2
{ {
flashLayer.Colour = ColourInfo.GradientVertical(colours.Red3.Opacity(0), colours.Red3); flashLayer.Colour = ColourInfo.GradientVertical(colours.Red3.Opacity(0), colours.Red3);
flashLayer.FadeOutFromOne(200, Easing.OutQuint); flashLayer.FadeOutFromOne(200, Easing.OutQuint);
} },
TabbableContentContainer = tabbableContentContainer,
}, },
slider = new Slider slider = new Slider
{ {