mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 12:03:03 +08:00
attemptSeek accesses beatmap Disabled directly
This commit is contained in:
parent
9248340df8
commit
2979cb96a6
@ -183,7 +183,7 @@ namespace osu.Game.Overlays
|
|||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Height = progress_height,
|
Height = progress_height,
|
||||||
FillColour = colours.Yellow,
|
FillColour = colours.Yellow,
|
||||||
OnSeek = conditionalSeek
|
OnSeek = attemptSeek
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -198,9 +198,9 @@ namespace osu.Game.Overlays
|
|||||||
playlist.StateChanged += s => playlistButton.FadeColour(s == Visibility.Visible ? colours.Yellow : Color4.White, 200, Easing.OutQuint);
|
playlist.StateChanged += s => playlistButton.FadeColour(s == Visibility.Visible ? colours.Yellow : Color4.White, 200, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void conditionalSeek(double progress)
|
private void attemptSeek(double progress)
|
||||||
{
|
{
|
||||||
if (enableSeek)
|
if (!beatmap.Disabled)
|
||||||
current?.Track.Seek(progress);
|
current?.Track.Seek(progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,8 +220,6 @@ namespace osu.Game.Overlays
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool enableSeek { get; set; }
|
|
||||||
|
|
||||||
private void beatmapDisabledChanged(bool disabled)
|
private void beatmapDisabledChanged(bool disabled)
|
||||||
{
|
{
|
||||||
if (disabled)
|
if (disabled)
|
||||||
@ -231,7 +229,6 @@ namespace osu.Game.Overlays
|
|||||||
prevButton.Enabled.Value = !disabled;
|
prevButton.Enabled.Value = !disabled;
|
||||||
nextButton.Enabled.Value = !disabled;
|
nextButton.Enabled.Value = !disabled;
|
||||||
playlistButton.Enabled.Value = !disabled;
|
playlistButton.Enabled.Value = !disabled;
|
||||||
enableSeek = !disabled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateAfterChildren()
|
protected override void UpdateAfterChildren()
|
||||||
|
Loading…
Reference in New Issue
Block a user