2019-01-24 08:43:03 +00:00
|
|
|
|
// 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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2020-01-31 10:10:44 +00:00
|
|
|
|
using System;
|
2019-04-08 09:32:05 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-01-06 06:25:53 +00:00
|
|
|
|
using JetBrains.Annotations;
|
2016-11-10 22:40:42 +00:00
|
|
|
|
using osu.Framework.Allocation;
|
2018-04-29 17:15:09 +00:00
|
|
|
|
using osu.Framework.Audio;
|
|
|
|
|
using osu.Framework.Audio.Sample;
|
2019-02-21 10:04:31 +00:00
|
|
|
|
using osu.Framework.Bindables;
|
2018-04-29 17:15:09 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
2017-02-17 09:59:30 +00:00
|
|
|
|
using osu.Framework.Screens;
|
2016-10-28 10:55:48 +00:00
|
|
|
|
using osu.Game.Beatmaps;
|
2021-09-16 07:08:09 +00:00
|
|
|
|
using osu.Game.Overlays;
|
2017-07-26 04:22:46 +00:00
|
|
|
|
using osu.Game.Rulesets;
|
2021-09-16 07:08:09 +00:00
|
|
|
|
using osu.Game.Rulesets.Mods;
|
2024-05-16 04:20:55 +00:00
|
|
|
|
using osu.Game.Screens.Footer;
|
2017-11-01 11:54:58 +00:00
|
|
|
|
using osu.Game.Screens.Menu;
|
2019-04-12 20:36:01 +00:00
|
|
|
|
using osu.Game.Users;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2016-11-14 08:23:33 +00:00
|
|
|
|
namespace osu.Game.Screens
|
2016-10-05 07:35:10 +00:00
|
|
|
|
{
|
2019-06-25 08:17:29 +00:00
|
|
|
|
public abstract partial class OsuScreen : Screen, IOsuScreen, IHasDescription
|
2016-10-05 07:35:10 +00:00
|
|
|
|
{
|
2019-01-25 05:10:59 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The amount of negative padding that should be applied to game background content which touches both the left and right sides of the screen.
|
2020-05-05 01:26:12 +00:00
|
|
|
|
/// This allows for the game content to be pushed by the options/notification overlays without causing black areas to appear.
|
2019-01-25 05:10:59 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
public const float HORIZONTAL_OVERFLOW_PADDING = 50;
|
|
|
|
|
|
2018-05-28 04:02:06 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A user-facing title for this screen.
|
|
|
|
|
/// </summary>
|
2020-04-28 07:56:36 +00:00
|
|
|
|
public virtual string Title => GetType().Name;
|
2018-05-28 04:02:06 +00:00
|
|
|
|
|
|
|
|
|
public string Description => Title;
|
|
|
|
|
|
2019-06-25 07:55:49 +00:00
|
|
|
|
public virtual bool AllowBackButton => true;
|
2018-05-04 18:18:48 +00:00
|
|
|
|
|
2024-05-16 04:20:55 +00:00
|
|
|
|
public virtual bool ShowFooter => false;
|
|
|
|
|
|
2018-11-29 08:18:59 +00:00
|
|
|
|
public virtual bool AllowExternalScreenChange => false;
|
|
|
|
|
|
2019-01-28 06:41:54 +00:00
|
|
|
|
public virtual bool HideOverlaysOnEnter => false;
|
2018-05-21 13:53:50 +00:00
|
|
|
|
|
2022-10-20 00:44:58 +00:00
|
|
|
|
public virtual bool HideMenuCursorOnNonMouseInput => false;
|
|
|
|
|
|
2018-05-21 13:53:50 +00:00
|
|
|
|
/// <summary>
|
2020-09-02 18:55:26 +00:00
|
|
|
|
/// The initial overlay activation mode to use when this screen is entered for the first time.
|
2018-05-21 13:53:50 +00:00
|
|
|
|
/// </summary>
|
2020-08-31 09:16:13 +00:00
|
|
|
|
protected virtual OverlayActivation InitialOverlayActivationMode => OverlayActivation.All;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-04-19 08:40:35 +00:00
|
|
|
|
public readonly Bindable<OverlayActivation> OverlayActivationMode;
|
2020-09-02 17:55:46 +00:00
|
|
|
|
|
|
|
|
|
IBindable<OverlayActivation> IOsuScreen.OverlayActivationMode => OverlayActivationMode;
|
2020-08-27 17:29:18 +00:00
|
|
|
|
|
2018-01-12 10:34:55 +00:00
|
|
|
|
public virtual bool CursorVisible => true;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2016-11-12 10:44:16 +00:00
|
|
|
|
protected new OsuGameBase Game => base.Game as OsuGameBase;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2019-04-12 20:36:01 +00:00
|
|
|
|
/// <summary>
|
2020-11-08 13:39:56 +00:00
|
|
|
|
/// The <see cref="UserActivity"/> to set the user's activity automatically to when this screen is entered.
|
|
|
|
|
/// <para>This <see cref="Activity"/> will be automatically set to <see cref="InitialActivity"/> for this screen on entering for the first time
|
|
|
|
|
/// unless <see cref="Activity"/> is manually set before.</para>
|
2019-04-12 20:36:01 +00:00
|
|
|
|
/// </summary>
|
2019-06-12 07:33:15 +00:00
|
|
|
|
protected virtual UserActivity InitialActivity => null;
|
2019-05-02 18:51:19 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-06-12 07:33:15 +00:00
|
|
|
|
/// The current <see cref="UserActivity"/> for this screen.
|
2019-05-02 18:51:19 +00:00
|
|
|
|
/// </summary>
|
2020-11-09 12:39:50 +00:00
|
|
|
|
protected readonly Bindable<UserActivity> Activity = new Bindable<UserActivity>();
|
2019-05-02 18:51:19 +00:00
|
|
|
|
|
2020-11-08 11:29:52 +00:00
|
|
|
|
IBindable<UserActivity> IOsuScreen.Activity => Activity;
|
2019-05-02 18:51:19 +00:00
|
|
|
|
|
2019-02-01 06:42:15 +00:00
|
|
|
|
/// <summary>
|
2019-02-13 02:34:48 +00:00
|
|
|
|
/// Whether to disallow changes to game-wise Beatmap/Ruleset bindables for this screen (and all children).
|
2019-02-01 06:42:15 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
public virtual bool DisallowExternalBeatmapRulesetChanges => false;
|
|
|
|
|
|
2021-01-19 08:11:40 +00:00
|
|
|
|
private Sample sampleExit;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-06-15 04:04:08 +00:00
|
|
|
|
protected virtual bool PlayExitSound => true;
|
2019-04-25 05:15:07 +00:00
|
|
|
|
|
2019-01-23 11:52:00 +00:00
|
|
|
|
public virtual float BackgroundParallaxAmount => 1;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2021-09-15 18:25:39 +00:00
|
|
|
|
[Resolved]
|
|
|
|
|
private MusicController musicController { get; set; }
|
|
|
|
|
|
2023-07-25 10:58:23 +00:00
|
|
|
|
public virtual bool? ApplyModTrackAdjustments => null;
|
2019-12-13 11:06:12 +00:00
|
|
|
|
|
2023-07-25 11:00:18 +00:00
|
|
|
|
public virtual bool? AllowGlobalTrackControl => null;
|
|
|
|
|
|
2023-10-17 08:48:51 +00:00
|
|
|
|
public Bindable<WorkingBeatmap> Beatmap { get; private set; } = null!;
|
2019-02-02 08:11:25 +00:00
|
|
|
|
|
2023-10-17 08:48:51 +00:00
|
|
|
|
public Bindable<RulesetInfo> Ruleset { get; private set; } = null!;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2019-04-10 08:13:12 +00:00
|
|
|
|
public Bindable<IReadOnlyList<Mod>> Mods { get; private set; }
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2020-01-31 10:10:44 +00:00
|
|
|
|
private OsuScreenDependencies screenDependencies;
|
|
|
|
|
|
2023-07-25 11:00:18 +00:00
|
|
|
|
private bool? globalMusicControlStateAtSuspend;
|
|
|
|
|
|
2023-07-25 10:58:23 +00:00
|
|
|
|
private bool? modTrackAdjustmentStateAtSuspend;
|
2021-09-16 07:08:09 +00:00
|
|
|
|
|
2020-01-31 10:10:44 +00:00
|
|
|
|
internal void CreateLeasedDependencies(IReadOnlyDependencyContainer dependencies) => createDependencies(dependencies);
|
|
|
|
|
|
2019-02-02 08:11:25 +00:00
|
|
|
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
|
|
|
|
{
|
2020-01-31 10:10:44 +00:00
|
|
|
|
if (screenDependencies == null)
|
|
|
|
|
{
|
|
|
|
|
if (DisallowExternalBeatmapRulesetChanges)
|
|
|
|
|
throw new InvalidOperationException($"Screens that specify {nameof(DisallowExternalBeatmapRulesetChanges)} must be pushed immediately.");
|
|
|
|
|
|
|
|
|
|
createDependencies(parent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return base.CreateChildDependencies(screenDependencies);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void createDependencies(IReadOnlyDependencyContainer dependencies)
|
|
|
|
|
{
|
|
|
|
|
screenDependencies = new OsuScreenDependencies(DisallowExternalBeatmapRulesetChanges, dependencies);
|
2019-02-01 06:42:15 +00:00
|
|
|
|
|
2019-04-09 03:53:00 +00:00
|
|
|
|
Beatmap = screenDependencies.Beatmap;
|
|
|
|
|
Ruleset = screenDependencies.Ruleset;
|
2019-04-10 03:03:57 +00:00
|
|
|
|
Mods = screenDependencies.Mods;
|
2019-02-02 08:11:25 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2021-01-04 09:32:23 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The background created and owned by this screen. May be null if the background didn't change.
|
|
|
|
|
/// </summary>
|
2021-01-06 06:25:53 +00:00
|
|
|
|
[CanBeNull]
|
2021-01-04 09:32:23 +00:00
|
|
|
|
private BackgroundScreen ownedBackground;
|
|
|
|
|
|
2021-01-06 06:25:53 +00:00
|
|
|
|
[CanBeNull]
|
2021-01-04 09:32:23 +00:00
|
|
|
|
private BackgroundScreen background;
|
2019-01-25 06:36:22 +00:00
|
|
|
|
|
2019-01-31 02:00:33 +00:00
|
|
|
|
[Resolved(canBeNull: true)]
|
2021-01-06 09:19:03 +00:00
|
|
|
|
[CanBeNull]
|
2019-01-25 06:36:22 +00:00
|
|
|
|
private BackgroundScreenStack backgroundStack { get; set; }
|
|
|
|
|
|
2019-01-31 02:00:33 +00:00
|
|
|
|
[Resolved(canBeNull: true)]
|
2019-01-25 06:36:22 +00:00
|
|
|
|
private OsuLogo logo { get; set; }
|
|
|
|
|
|
2024-05-16 04:20:55 +00:00
|
|
|
|
[Resolved(canBeNull: true)]
|
|
|
|
|
[CanBeNull]
|
|
|
|
|
protected ScreenFooter Footer { get; private set; }
|
|
|
|
|
|
2019-01-23 11:52:00 +00:00
|
|
|
|
protected OsuScreen()
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.Centre;
|
|
|
|
|
Origin = Anchor.Centre;
|
2020-08-27 17:29:18 +00:00
|
|
|
|
|
|
|
|
|
OverlayActivationMode = new Bindable<OverlayActivation>(InitialOverlayActivationMode);
|
2019-01-23 11:52:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-06-06 11:19:53 +00:00
|
|
|
|
[BackgroundDependencyLoader(true)]
|
2022-01-15 00:06:39 +00:00
|
|
|
|
private void load(AudioManager audio)
|
2016-10-28 13:03:59 +00:00
|
|
|
|
{
|
2019-05-28 08:06:01 +00:00
|
|
|
|
sampleExit = audio.Samples.Get(@"UI/screen-back");
|
2021-01-08 20:13:36 +00:00
|
|
|
|
}
|
2020-11-08 11:53:19 +00:00
|
|
|
|
|
2021-01-08 20:13:36 +00:00
|
|
|
|
protected override void LoadComplete()
|
|
|
|
|
{
|
|
|
|
|
base.LoadComplete();
|
2020-11-08 17:22:19 +00:00
|
|
|
|
Activity.Value ??= InitialActivity;
|
2016-10-28 10:55:48 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2021-01-06 06:26:13 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Apply arbitrary changes to the current background screen in a thread safe manner.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="action">The operation to perform.</param>
|
|
|
|
|
public void ApplyToBackground(Action<BackgroundScreen> action)
|
|
|
|
|
{
|
2021-01-06 09:19:03 +00:00
|
|
|
|
if (backgroundStack == null)
|
|
|
|
|
throw new InvalidOperationException("Attempted to apply to background without a background stack being available.");
|
|
|
|
|
|
2021-01-06 06:26:13 +00:00
|
|
|
|
if (background == null)
|
2021-01-06 09:19:03 +00:00
|
|
|
|
throw new InvalidOperationException("Attempted to apply to background before screen is pushed.");
|
2021-01-06 06:26:13 +00:00
|
|
|
|
|
|
|
|
|
background.ApplyToBackground(action);
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-21 15:52:44 +00:00
|
|
|
|
public override void OnResuming(ScreenTransitionEvent e)
|
2017-06-28 17:19:04 +00:00
|
|
|
|
{
|
2018-02-28 02:42:28 +00:00
|
|
|
|
applyArrivingDefaults(true);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2021-09-16 07:31:41 +00:00
|
|
|
|
// it's feasible to resume to a screen if the target screen never loaded successfully.
|
|
|
|
|
// in such a case there's no need to restore this value.
|
2023-07-25 10:58:23 +00:00
|
|
|
|
if (modTrackAdjustmentStateAtSuspend != null)
|
|
|
|
|
musicController.ApplyModTrackAdjustments = modTrackAdjustmentStateAtSuspend.Value;
|
2023-07-25 11:00:18 +00:00
|
|
|
|
if (globalMusicControlStateAtSuspend != null)
|
|
|
|
|
musicController.AllowTrackControl.Value = globalMusicControlStateAtSuspend.Value;
|
2021-09-16 07:08:09 +00:00
|
|
|
|
|
2022-04-21 15:52:44 +00:00
|
|
|
|
base.OnResuming(e);
|
2017-06-28 17:19:04 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-04-21 15:52:44 +00:00
|
|
|
|
public override void OnSuspending(ScreenTransitionEvent e)
|
2017-11-01 11:54:58 +00:00
|
|
|
|
{
|
2022-04-21 15:52:44 +00:00
|
|
|
|
base.OnSuspending(e);
|
2019-04-30 19:40:44 +00:00
|
|
|
|
|
2023-07-25 10:58:23 +00:00
|
|
|
|
modTrackAdjustmentStateAtSuspend = musicController.ApplyModTrackAdjustments;
|
2023-07-25 11:00:18 +00:00
|
|
|
|
globalMusicControlStateAtSuspend = musicController.AllowTrackControl.Value;
|
2021-09-16 07:08:09 +00:00
|
|
|
|
|
2017-11-08 07:34:03 +00:00
|
|
|
|
onSuspendingLogo();
|
2017-11-01 11:54:58 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-04-21 15:52:44 +00:00
|
|
|
|
public override void OnEntering(ScreenTransitionEvent e)
|
2016-10-05 07:35:10 +00:00
|
|
|
|
{
|
2018-02-28 02:42:28 +00:00
|
|
|
|
applyArrivingDefaults(false);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2023-07-25 10:58:23 +00:00
|
|
|
|
if (ApplyModTrackAdjustments != null)
|
|
|
|
|
musicController.ApplyModTrackAdjustments = ApplyModTrackAdjustments.Value;
|
2021-09-16 07:08:09 +00:00
|
|
|
|
|
2023-07-25 11:00:18 +00:00
|
|
|
|
if (AllowGlobalTrackControl != null)
|
|
|
|
|
musicController.AllowTrackControl.Value = AllowGlobalTrackControl.Value;
|
|
|
|
|
|
2021-09-07 05:33:58 +00:00
|
|
|
|
if (backgroundStack?.Push(ownedBackground = CreateBackground()) != true)
|
2021-01-04 09:32:23 +00:00
|
|
|
|
{
|
2021-09-07 05:33:58 +00:00
|
|
|
|
// If the constructed instance was not actually pushed to the background stack, we don't want to track it unnecessarily.
|
2021-01-06 06:28:01 +00:00
|
|
|
|
ownedBackground?.Dispose();
|
2021-01-04 09:32:23 +00:00
|
|
|
|
ownedBackground = null;
|
|
|
|
|
}
|
2019-01-25 06:36:22 +00:00
|
|
|
|
|
2021-09-07 05:33:58 +00:00
|
|
|
|
background = backgroundStack?.CurrentScreen as BackgroundScreen;
|
2022-04-21 15:52:44 +00:00
|
|
|
|
base.OnEntering(e);
|
2016-10-05 07:35:10 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-04-21 15:52:44 +00:00
|
|
|
|
public override bool OnExiting(ScreenExitEvent e)
|
2016-10-05 07:35:10 +00:00
|
|
|
|
{
|
2024-01-18 07:31:33 +00:00
|
|
|
|
// Only play the exit sound if we are the last screen in the exit sequence.
|
|
|
|
|
// This stops many sample playbacks from stacking when a huge screen purge happens (ie. returning to menu via the home button
|
|
|
|
|
// from a deeply nested screen).
|
|
|
|
|
bool arrivingAtFinalDestination = e.Next == e.Destination;
|
|
|
|
|
|
|
|
|
|
if (ValidForResume && PlayExitSound && arrivingAtFinalDestination)
|
2022-06-15 04:04:08 +00:00
|
|
|
|
sampleExit?.Play();
|
|
|
|
|
|
2017-11-01 11:54:58 +00:00
|
|
|
|
if (ValidForResume && logo != null)
|
2017-11-08 07:34:03 +00:00
|
|
|
|
onExitingLogo();
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-04-21 15:52:44 +00:00
|
|
|
|
if (base.OnExiting(e))
|
2017-05-23 13:30:15 +00:00
|
|
|
|
return true;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2021-01-04 09:32:23 +00:00
|
|
|
|
if (ownedBackground != null && backgroundStack?.CurrentScreen == ownedBackground)
|
2019-01-31 09:10:21 +00:00
|
|
|
|
backgroundStack?.Exit();
|
2019-01-25 06:36:22 +00:00
|
|
|
|
|
2017-05-23 13:30:15 +00:00
|
|
|
|
return false;
|
2016-10-05 07:35:10 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-11-08 07:34:03 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fired when this screen was entered or resumed and the logo state is required to be adjusted.
|
|
|
|
|
/// </summary>
|
2017-11-09 08:38:20 +00:00
|
|
|
|
protected virtual void LogoArriving(OsuLogo logo, bool resuming)
|
2017-11-01 11:54:58 +00:00
|
|
|
|
{
|
2023-05-23 20:14:57 +00:00
|
|
|
|
logo.Action = null;
|
|
|
|
|
logo.FadeOut(300, Easing.OutQuint);
|
2024-01-29 19:04:18 +00:00
|
|
|
|
|
2023-05-23 20:14:57 +00:00
|
|
|
|
logo.Origin = Anchor.Centre;
|
2024-01-29 19:04:18 +00:00
|
|
|
|
|
|
|
|
|
logo.ChangeAnchor(Anchor.TopLeft);
|
2023-05-23 20:14:57 +00:00
|
|
|
|
logo.RelativePositionAxes = Axes.Both;
|
2024-01-29 19:04:18 +00:00
|
|
|
|
|
2023-05-23 20:14:57 +00:00
|
|
|
|
logo.Triangles = true;
|
|
|
|
|
logo.Ripple = true;
|
2017-11-01 11:54:58 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-02-28 02:42:28 +00:00
|
|
|
|
private void applyArrivingDefaults(bool isResuming)
|
|
|
|
|
{
|
2019-01-31 02:00:33 +00:00
|
|
|
|
logo?.AppendAnimatingAction(() =>
|
2018-05-30 10:25:39 +00:00
|
|
|
|
{
|
2019-01-23 11:52:00 +00:00
|
|
|
|
if (this.IsCurrentScreen()) LogoArriving(logo, isResuming);
|
2018-05-30 10:25:39 +00:00
|
|
|
|
}, true);
|
2018-02-28 02:42:28 +00:00
|
|
|
|
}
|
2019-01-25 12:02:35 +00:00
|
|
|
|
|
2017-11-08 07:34:03 +00:00
|
|
|
|
private void onExitingLogo()
|
2017-11-01 11:54:58 +00:00
|
|
|
|
{
|
2019-01-31 02:00:33 +00:00
|
|
|
|
logo?.AppendAnimatingAction(() => LogoExiting(logo), false);
|
2017-11-01 11:54:58 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-11-08 07:34:03 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fired when this screen was exited to add any outwards transition to the logo.
|
|
|
|
|
/// </summary>
|
2017-11-09 08:38:20 +00:00
|
|
|
|
protected virtual void LogoExiting(OsuLogo logo)
|
2017-11-01 11:54:58 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-11-08 07:34:03 +00:00
|
|
|
|
private void onSuspendingLogo()
|
2017-11-01 11:54:58 +00:00
|
|
|
|
{
|
2019-01-31 02:00:33 +00:00
|
|
|
|
logo?.AppendAnimatingAction(() => LogoSuspending(logo), false);
|
2017-11-01 11:54:58 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-11-08 07:34:03 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fired when this screen was suspended to add any outwards transition to the logo.
|
|
|
|
|
/// </summary>
|
2017-11-09 08:38:20 +00:00
|
|
|
|
protected virtual void LogoSuspending(OsuLogo logo)
|
2017-11-01 11:54:58 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2019-01-25 06:36:22 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Override to create a BackgroundMode for the current screen.
|
|
|
|
|
/// Note that the instance created may not be the used instance if it matches the BackgroundMode equality clause.
|
|
|
|
|
/// </summary>
|
|
|
|
|
protected virtual BackgroundScreen CreateBackground() => null;
|
2020-07-14 06:59:20 +00:00
|
|
|
|
|
2024-05-16 04:20:55 +00:00
|
|
|
|
public virtual IReadOnlyList<ScreenFooterButton> CreateFooterButtons() => Array.Empty<ScreenFooterButton>();
|
|
|
|
|
|
2020-07-14 06:59:20 +00:00
|
|
|
|
public virtual bool OnBackButton() => false;
|
2016-10-05 07:35:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|