From 0f13acf67e4af21539a04e7a265b1e0d0bacdbcf Mon Sep 17 00:00:00 2001 From: Joehu Date: Sat, 2 Jun 2018 12:52:31 -0700 Subject: [PATCH] Use updateExpanded method --- .../Screens/Play/PlayerSettings/PlayerSettingsGroup.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerSettings/PlayerSettingsGroup.cs b/osu.Game/Screens/Play/PlayerSettings/PlayerSettingsGroup.cs index 967cfd7fa0..cff3eca895 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlayerSettingsGroup.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlayerSettingsGroup.cs @@ -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 Content => content; protected override bool OnHover(InputState state) => true;