1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 05:03:20 +08:00

Removed unnecessary variables

This commit is contained in:
MrTheMake 2017-07-14 12:45:24 +02:00
parent a95339dc1d
commit d2c18026f2
2 changed files with 5 additions and 14 deletions

View File

@ -34,8 +34,6 @@ namespace osu.Game.Graphics.UserInterface
set { icon.Scale = value; }
}
private Color4 disableColour;
public IconButton()
{
AutoSizeAxes = Axes.Both;
@ -82,9 +80,8 @@ namespace osu.Game.Graphics.UserInterface
{
hover.Colour = colours.Yellow.Opacity(0.6f);
flashColour = colours.Yellow;
disableColour = colours.Gray9;
Enabled.ValueChanged += newEnabled => FadeColour(newEnabled ? Color4.White : disableColour, 200, EasingTypes.OutQuint);
Enabled.ValueChanged += newEnabled => FadeColour(newEnabled ? Color4.White : colours.Gray9, 200, EasingTypes.OutQuint);
}
protected override bool OnHover(InputState state)

View File

@ -207,13 +207,7 @@ namespace osu.Game.Overlays
beatmapBacking.BindTo(game.Beatmap);
playlistButtonColor = colours.Yellow;
playlist.StateChanged += (c, s) =>
{
if (playlistButton.Enabled)
playlistButton.FadeColour(s == Visibility.Visible ? playlistButtonColor : Color4.White, 200, EasingTypes.OutQuint);
};
playlist.StateChanged += (c, s) => playlistButton.FadeColour(s == Visibility.Visible ? colours.Yellow : Color4.White, 200, EasingTypes.OutQuint);
}
protected override void LoadComplete()
@ -227,12 +221,12 @@ namespace osu.Game.Overlays
private void beatmapDisabledChanged(bool disabled)
{
if (disabled)
playlist.Hide();
prevButton.Enabled.Value = !disabled;
nextButton.Enabled.Value = !disabled;
playlistButton.Enabled.Value = !disabled;
if (disabled)
playlist.Hide();
}
protected override void UpdateAfterChildren()