mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:12:56 +08:00
Merge branch 'master' into fix-catch-nullref
This commit is contained in:
commit
5d83d00806
@ -580,10 +580,10 @@ namespace osu.Game
|
||||
|
||||
// we only want to apply these restrictions when we are inside a screen stack.
|
||||
// the use case for not applying is in visual/unit tests.
|
||||
bool applyRestrictions = !currentScreen?.AllowBeatmapRulesetChange ?? false;
|
||||
bool applyBeatmapRulesetRestrictions = !currentScreen?.AllowBeatmapRulesetChange ?? false;
|
||||
|
||||
ruleset.Disabled = applyRestrictions;
|
||||
Beatmap.Disabled = applyRestrictions;
|
||||
ruleset.Disabled = applyBeatmapRulesetRestrictions;
|
||||
Beatmap.Disabled = applyBeatmapRulesetRestrictions;
|
||||
|
||||
mainContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||
|
||||
|
@ -183,7 +183,7 @@ namespace osu.Game.Overlays
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Height = progress_height,
|
||||
FillColour = colours.Yellow,
|
||||
OnSeek = progress => current?.Track.Seek(progress)
|
||||
OnSeek = attemptSeek
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -198,6 +198,12 @@ namespace osu.Game.Overlays
|
||||
playlist.StateChanged += s => playlistButton.FadeColour(s == Visibility.Visible ? colours.Yellow : Color4.White, 200, Easing.OutQuint);
|
||||
}
|
||||
|
||||
private void attemptSeek(double progress)
|
||||
{
|
||||
if (!beatmap.Disabled)
|
||||
current?.Track.Seek(progress);
|
||||
}
|
||||
|
||||
private void playlistOrderChanged(BeatmapSetInfo beatmapSetInfo, int index)
|
||||
{
|
||||
beatmapSets.Remove(beatmapSetInfo);
|
||||
@ -219,6 +225,7 @@ namespace osu.Game.Overlays
|
||||
if (disabled)
|
||||
playlist.Hide();
|
||||
|
||||
playButton.Enabled.Value = !disabled;
|
||||
prevButton.Enabled.Value = !disabled;
|
||||
nextButton.Enabled.Value = !disabled;
|
||||
playlistButton.Enabled.Value = !disabled;
|
||||
|
Loading…
Reference in New Issue
Block a user