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 @@ public void OnJudgement(DrawableCatchHitObject fruit, Judgement judgement)
{
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 @@ protected override void UpdateAfterChildren()
// 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 @@ private void load(BindableBeatmap beatmap, BeatmapManager beatmaps, OsuColour co
Anchor = Anchor.BottomCentre,
Height = progress_height,
FillColour = colours.Yellow,
OnSeek = progress => current?.Track.Seek(progress)
OnSeek = attemptSeek
}
},
},
@ -198,6 +198,12 @@ private void load(BindableBeatmap beatmap, BeatmapManager beatmaps, OsuColour co
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 @@ private void beatmapDisabledChanged(bool disabled)
if (disabled)
playlist.Hide();
playButton.Enabled.Value = !disabled;
prevButton.Enabled.Value = !disabled;
nextButton.Enabled.Value = !disabled;
playlistButton.Enabled.Value = !disabled;