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:
parent
a95339dc1d
commit
d2c18026f2
@ -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)
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user