Cleanup external PlayButton.Playing usage

This commit is contained in:
Roman Kapustin
2018-05-25 22:35:15 +03:00
parent 498244a308
commit a24589f583
6 changed files with 37 additions and 65 deletions

View File

@ -66,7 +66,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
},
};
Action = () => Playing.Value = !Playing.Value;
Action = () => playButton.TriggerOnClick();
Playing.ValueChanged += newValue => progress.FadeTo(newValue ? 1 : 0, 100);
}
@ -89,12 +89,6 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
progress.Width = 0;
}
protected override void Dispose(bool isDisposing)
{
Playing.Value = false;
base.Dispose(isDisposing);
}
protected override bool OnHover(InputState state)
{
bg.FadeColour(Color4.Black.Opacity(0.5f), 100);