mirror of https://github.com/ppy/osu
Ensure `ChannelListSelector` text also turns white when selected
This commit is contained in:
parent
a931b1ecc3
commit
50aee8b665
|
@ -21,6 +21,10 @@ public class ChannelListSelector : OsuClickableContainer
|
|||
|
||||
private Box hoverBox = null!;
|
||||
private Box selectBox = null!;
|
||||
private OsuSpriteText text = null!;
|
||||
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
|
@ -46,7 +50,7 @@ private void load(OverlayColourProvider colourProvider)
|
|||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = 18, Right = 10 },
|
||||
Child = new OsuSpriteText
|
||||
Child = text = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
|
@ -68,9 +72,15 @@ protected override void LoadComplete()
|
|||
SelectorActive.BindValueChanged(selector =>
|
||||
{
|
||||
if (selector.NewValue)
|
||||
{
|
||||
text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint);
|
||||
selectBox.FadeIn(300, Easing.OutQuint);
|
||||
}
|
||||
else
|
||||
{
|
||||
text.FadeColour(colourProvider.Light3, 200, Easing.OutQuint);
|
||||
selectBox.FadeOut(200, Easing.OutQuint);
|
||||
}
|
||||
}, true);
|
||||
|
||||
Action = () => SelectorActive.Value = true;
|
||||
|
|
Loading…
Reference in New Issue