Fix visual settings expand button colour

This commit is contained in:
Joehu 2018-06-01 15:31:25 -07:00
parent 53b11155d1
commit 5d1421c0e9
1 changed files with 12 additions and 3 deletions

View File

@ -50,11 +50,11 @@ public bool Expanded
content.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
}
button.FadeColour(expanded ? buttonActiveColour : Color4.White, 200, Easing.OutQuint);
button.FadeColour(expanded ? expandedColour : Color4.White, 200, Easing.OutQuint);
}
}
private Color4 buttonActiveColour;
private Color4 expandedColour;
protected PlayerSettingsGroup()
{
@ -130,7 +130,16 @@ protected PlayerSettingsGroup()
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
button.Colour = buttonActiveColour = colours.Yellow;
if (expanded)
{
button.Colour = colours.Yellow;
}
else
{
button.Colour = Color4.White;
}
expandedColour = colours.Yellow;
}
protected override Container<Drawable> Content => content;