1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 17:37:24 +08:00
osu-lazer/osu.Game/Screens/IOsuScreen.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

106 lines
4.1 KiB
C#
Raw Normal View History

2019-01-29 20:48:35 +08: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.
2019-01-23 19:52:00 +08:00
2024-05-16 12:20:55 +08:00
using System.Collections.Generic;
2019-02-21 18:04:31 +08:00
using osu.Framework.Bindables;
2019-01-23 19:52:00 +08:00
using osu.Framework.Screens;
2019-02-01 14:42:15 +08:00
using osu.Game.Beatmaps;
using osu.Game.Overlays;
2019-02-01 14:42:15 +08:00
using osu.Game.Rulesets;
2024-05-16 12:20:55 +08:00
using osu.Game.Screens.Footer;
2020-11-08 19:29:52 +08:00
using osu.Game.Users;
2019-01-23 19:52:00 +08:00
namespace osu.Game.Screens
{
public interface IOsuScreen : IScreen
{
/// <summary>
/// Whether the beatmap or ruleset should be allowed to be changed by the user or game.
/// Used to mark exclusive areas where this is strongly prohibited, like gameplay.
/// </summary>
2019-02-01 14:42:15 +08:00
bool DisallowExternalBeatmapRulesetChanges { get; }
2019-01-23 19:52:00 +08:00
2019-06-25 15:55:49 +08:00
/// <summary>
2024-05-16 12:20:55 +08:00
/// Whether the user can exit this <see cref="IOsuScreen"/> by pressing the back button.
2019-06-25 15:55:49 +08:00
/// </summary>
bool AllowBackButton { get; }
2024-05-16 12:20:55 +08:00
/// <summary>
/// Whether a footer (and a back button) should be displayed underneath the screen.
/// </summary>
/// <remarks>
/// Temporarily, the back button is shown regardless of whether <see cref="AllowBackButton"/> is true.
/// </remarks>
bool ShowFooter { get; }
/// <summary>
/// Whether a top-level component should be allowed to exit the current screen to, for example,
/// complete an import. Note that this can be overridden by a user if they specifically request.
/// </summary>
bool AllowExternalScreenChange { get; }
2019-01-23 19:52:00 +08:00
/// <summary>
/// Whether this <see cref="OsuScreen"/> allows the cursor to be displayed.
/// </summary>
bool CursorVisible { get; }
/// <summary>
/// Whether all overlays should be hidden when this screen is entered or resumed.
/// </summary>
bool HideOverlaysOnEnter { get; }
/// <summary>
/// Whether the menu cursor should be hidden when non-mouse input is received.
/// </summary>
bool HideMenuCursorOnNonMouseInput { get; }
/// <summary>
/// Whether overlays should be able to be opened when this screen is current.
/// </summary>
IBindable<OverlayActivation> OverlayActivationMode { get; }
2020-11-08 19:29:52 +08:00
/// <summary>
/// The current <see cref="UserActivity"/> for this screen.
/// </summary>
IBindable<UserActivity> Activity { get; }
/// <summary>
/// The amount of parallax to be applied while this screen is displayed.
/// </summary>
float BackgroundParallaxAmount { get; }
2019-02-01 14:42:15 +08:00
Bindable<WorkingBeatmap> Beatmap { get; }
Bindable<RulesetInfo> Ruleset { get; }
2024-05-16 12:20:55 +08:00
/// <summary>
/// A list of footer buttons to be added to the game footer, or empty to display no buttons.
/// </summary>
IReadOnlyList<ScreenFooterButton> CreateFooterButtons();
/// <summary>
/// Whether mod track adjustments should be applied on entering this screen.
/// A <see langword="null"/> value means that the parent screen's value of this setting will be used.
/// </summary>
bool? ApplyModTrackAdjustments { get; }
2020-07-14 14:59:20 +08:00
/// <summary>
/// Whether control of the global track should be allowed via the music controller / now playing overlay.
/// A <see langword="null"/> value means that the parent screen's value of this setting will be used.
/// </summary>
bool? AllowGlobalTrackControl { get; }
2020-07-15 04:14:59 +08:00
/// <summary>
/// Invoked when the back button has been pressed to close any overlays before exiting this <see cref="IOsuScreen"/>.
2020-07-15 04:14:59 +08:00
/// </summary>
/// <remarks>
/// If this <see cref="IOsuScreen"/> has not yet finished loading, the exit will occur immediately without this method being invoked.
/// <para>
/// Return <c>true</c> to block this <see cref="IOsuScreen"/> from being exited after closing an overlay.
/// Return <c>false</c> if this <see cref="IOsuScreen"/> should continue exiting.
/// </para>
/// </remarks>
2020-07-14 14:59:20 +08:00
bool OnBackButton();
2019-01-23 19:52:00 +08:00
}
}