1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 06:52:55 +08:00

Merge branch 'master' into fix-editor-lifetime

This commit is contained in:
Dean Herbert 2018-07-28 12:35:39 +09:00 committed by GitHub
commit ac67c2dab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 4 deletions

View File

@ -52,6 +52,9 @@ namespace osu.Game.Rulesets.Catch.UI
{
void runAfterLoaded(Action action)
{
if (lastPlateableFruit == null)
return;
// this is required to make this run after the last caught fruit runs UpdateState at least once.
// TODO: find a better alternative
if (lastPlateableFruit.IsLoaded)

View File

@ -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 };

View File

@ -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;