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

Fix preview play button having incorrect click area

This commit is contained in:
Joseph Madamba 2024-08-10 00:49:51 -07:00
parent fda17a5a72
commit e2bf02cf94
2 changed files with 4 additions and 3 deletions

View File

@ -90,10 +90,9 @@ namespace osu.Game.Beatmaps.Drawables.Cards
protected override void Update()
{
base.Update();
progress.Progress = playButton.Progress.Value;
playButton.Scale = new Vector2(DrawWidth / 100);
progress.Size = new Vector2(50 * DrawWidth / 100);
progress.Progress = playButton.Progress.Value;
progress.Size = new Vector2(50 * playButton.DrawWidth / (BeatmapCardNormal.HEIGHT - BeatmapCard.CORNER_RADIUS));
}
private void updateState()

View File

@ -79,6 +79,8 @@ namespace osu.Game.Beatmaps.Drawables.Cards.Buttons
{
base.Update();
icon.Scale = new Vector2(DrawWidth / (BeatmapCardNormal.HEIGHT - BeatmapCard.CORNER_RADIUS));
if (Playing.Value && previewTrack != null && previewTrack.TrackLoaded)
progress.Value = previewTrack.CurrentTime / previewTrack.Length;
else