1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Use updateExpanded method

This commit is contained in:
Joehu 2018-06-02 12:52:31 -07:00
parent 8d3de3affb
commit 0f13acf67e

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
content.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
}
button.FadeColour(expanded ? expandedColour : Color4.White, 200, Easing.OutQuint);
updateExpanded();
}
}
@ -130,11 +130,13 @@ namespace osu.Game.Screens.Play.PlayerSettings
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
button.FadeColour(expanded ? colours.Yellow : Color4.White);
expandedColour = colours.Yellow;
updateExpanded();
}
private void updateExpanded() => button.FadeColour(expanded ? expandedColour : Color4.White, 200, Easing.InOutQuint);
protected override Container<Drawable> Content => content;
protected override bool OnHover(InputState state) => true;