Merge branch 'master' into difficulty-point-multiple

This commit is contained in:
Dean Herbert
2021-11-13 23:47:12 +09:00
committed by GitHub
7 changed files with 130 additions and 45 deletions

View File

@ -31,6 +31,7 @@ using osu.Game.Screens.Edit.Components.Menus;
using osu.Game.Screens.Edit.Components.Timelines.Summary;
using osu.Game.Screens.Edit.Compose;
using osu.Game.Screens.Edit.Design;
using osu.Game.Screens.Edit.GameplayTest;
using osu.Game.Screens.Edit.Setup;
using osu.Game.Screens.Edit.Timing;
using osu.Game.Screens.Edit.Verify;
@ -486,7 +487,18 @@ namespace osu.Game.Screens.Edit
public override void OnEntering(IScreen last)
{
base.OnEntering(last);
dimBackground();
resetTrack(true);
}
public override void OnResuming(IScreen last)
{
base.OnResuming(last);
dimBackground();
}
private void dimBackground()
{
ApplyToBackground(b =>
{
// todo: temporary. we want to be applying dim using the UserDimContainer eventually.
@ -495,8 +507,6 @@ namespace osu.Game.Screens.Edit
b.IgnoreUserSettings.Value = true;
b.BlurAmount.Value = 0;
});
resetTrack(true);
}
public override bool OnExiting(IScreen next)
@ -535,9 +545,9 @@ namespace osu.Game.Screens.Edit
public override void OnSuspending(IScreen next)
{
refetchBeatmap();
base.OnSuspending(next);
clock.Stop();
refetchBeatmap();
}
private void refetchBeatmap()
@ -797,7 +807,7 @@ namespace osu.Game.Screens.Edit
pushEditorPlayer();
}
void pushEditorPlayer() => this.Push(new PlayerLoader(() => new EditorPlayer()));
void pushEditorPlayer() => this.Push(new EditorPlayerLoader());
}
public double SnapTime(double time, double? referenceTime) => editorBeatmap.SnapTime(time, referenceTime);

View File

@ -6,7 +6,7 @@ using osu.Framework.Screens;
using osu.Game.Overlays;
using osu.Game.Screens.Play;
namespace osu.Game.Screens.Edit
namespace osu.Game.Screens.Edit.GameplayTest
{
public class EditorPlayer : Player
{

View File

@ -0,0 +1,44 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Play;
namespace osu.Game.Screens.Edit.GameplayTest
{
public class EditorPlayerLoader : PlayerLoader
{
[Resolved]
private OsuLogo osuLogo { get; set; }
public EditorPlayerLoader()
: base(() => new EditorPlayer())
{
}
public override void OnEntering(IScreen last)
{
base.OnEntering(last);
MetadataInfo.FinishTransforms(true);
}
protected override void LogoArriving(OsuLogo logo, bool resuming)
{
// call base with resuming forcefully set to true to reduce logo movements.
base.LogoArriving(logo, true);
logo.FinishTransforms(true, nameof(Scale));
}
protected override void ContentOut()
{
base.ContentOut();
osuLogo.FadeOut(CONTENT_OUT_DURATION, Easing.OutQuint);
}
protected override double PlayerPushDelay => 0;
}
}

View File

@ -5,7 +5,7 @@ using System;
using osu.Framework.Graphics.Sprites;
using osu.Game.Overlays.Dialog;
namespace osu.Game.Screens.Edit
namespace osu.Game.Screens.Edit.GameplayTest
{
public class SaveBeforeGameplayTestDialog : PopupDialog
{