2019-01-29 12:48:35 +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.
|
2019-01-23 11:52:00 +00:00
|
|
|
|
|
2019-02-21 10:04:31 +00:00
|
|
|
|
using osu.Framework.Bindables;
|
2019-01-23 11:52:00 +00:00
|
|
|
|
using osu.Framework.Screens;
|
2019-02-01 06:42:15 +00:00
|
|
|
|
using osu.Game.Beatmaps;
|
2019-01-28 06:41:54 +00:00
|
|
|
|
using osu.Game.Overlays;
|
2019-02-01 06:42:15 +00:00
|
|
|
|
using osu.Game.Rulesets;
|
2020-11-08 11:29:52 +00:00
|
|
|
|
using osu.Game.Users;
|
2019-01-23 11:52:00 +00: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 06:42:15 +00:00
|
|
|
|
bool DisallowExternalBeatmapRulesetChanges { get; }
|
2019-01-23 11:52:00 +00:00
|
|
|
|
|
2019-06-25 07:55:49 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the user can exit this this <see cref="IOsuScreen"/> by pressing the back button.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool AllowBackButton { get; }
|
|
|
|
|
|
2019-02-13 10:43:01 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether a top-level component should be allowed to exit the current screen to, for example,
|
2019-02-25 05:01:51 +00:00
|
|
|
|
/// complete an import. Note that this can be overridden by a user if they specifically request.
|
2019-02-13 10:43:01 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
bool AllowExternalScreenChange { get; }
|
|
|
|
|
|
2019-01-23 11:52:00 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this <see cref="OsuScreen"/> allows the cursor to be displayed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool CursorVisible { get; }
|
2019-01-28 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether all overlays should be hidden when this screen is entered or resumed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool HideOverlaysOnEnter { get; }
|
|
|
|
|
|
2022-10-20 00:44:58 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the menu cursor should be hidden when non-mouse input is received.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool HideMenuCursorOnNonMouseInput { get; }
|
|
|
|
|
|
2019-01-28 06:41:54 +00:00
|
|
|
|
/// <summary>
|
2020-08-27 17:29:18 +00:00
|
|
|
|
/// Whether overlays should be able to be opened when this screen is current.
|
2019-01-28 06:41:54 +00:00
|
|
|
|
/// </summary>
|
2020-09-02 17:55:46 +00:00
|
|
|
|
IBindable<OverlayActivation> OverlayActivationMode { get; }
|
2019-01-31 09:10:21 +00:00
|
|
|
|
|
2020-11-08 11:29:52 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The current <see cref="UserActivity"/> for this screen.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IBindable<UserActivity> Activity { get; }
|
|
|
|
|
|
2019-01-31 09:10:21 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The amount of parallax to be applied while this screen is displayed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
float BackgroundParallaxAmount { get; }
|
2019-02-01 06:42:15 +00:00
|
|
|
|
|
|
|
|
|
Bindable<WorkingBeatmap> Beatmap { get; }
|
|
|
|
|
|
|
|
|
|
Bindable<RulesetInfo> Ruleset { get; }
|
2019-11-15 04:47:14 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-09-16 07:08:09 +00:00
|
|
|
|
/// Whether mod track adjustments should be applied on entering this screen.
|
2021-09-15 08:00:49 +00:00
|
|
|
|
/// A <see langword="null"/> value means that the parent screen's value of this setting will be used.
|
2019-11-15 04:47:14 +00:00
|
|
|
|
/// </summary>
|
2023-07-25 10:58:23 +00:00
|
|
|
|
bool? ApplyModTrackAdjustments { get; }
|
2020-07-14 06:59:20 +00:00
|
|
|
|
|
2023-07-25 11:00:18 +00: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-14 20:14:59 +00:00
|
|
|
|
/// <summary>
|
2020-07-15 04:08:57 +00:00
|
|
|
|
/// Invoked when the back button has been pressed to close any overlays before exiting this <see cref="IOsuScreen"/>.
|
2020-07-14 20:14:59 +00:00
|
|
|
|
/// </summary>
|
2020-07-15 04:08:57 +00:00
|
|
|
|
/// <remarks>
|
2021-06-08 08:38:12 +00:00
|
|
|
|
/// If this <see cref="IOsuScreen"/> has not yet finished loading, the exit will occur immediately without this method being invoked.
|
|
|
|
|
/// <para>
|
2020-07-15 04:08:57 +00:00
|
|
|
|
/// 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.
|
2021-06-08 08:38:12 +00:00
|
|
|
|
/// </para>
|
2020-07-15 04:08:57 +00:00
|
|
|
|
/// </remarks>
|
2020-07-14 06:59:20 +00:00
|
|
|
|
bool OnBackButton();
|
2019-01-23 11:52:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|