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
|
|
|
|
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;
|
2019-01-28 14:41:54 +08:00
|
|
|
using osu.Game.Overlays;
|
2019-02-01 14:42:15 +08:00
|
|
|
using osu.Game.Rulesets;
|
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>
|
|
|
|
/// Whether the user can exit this this <see cref="IOsuScreen"/> by pressing the back button.
|
|
|
|
/// </summary>
|
|
|
|
bool AllowBackButton { get; }
|
|
|
|
|
2019-02-13 18:43:01 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Whether a top-level component should be allowed to exit the current screen to, for example,
|
2019-02-25 13:01:51 +08:00
|
|
|
/// complete an import. Note that this can be overridden by a user if they specifically request.
|
2019-02-13 18:43:01 +08:00
|
|
|
/// </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; }
|
2019-01-28 14:41:54 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Whether all overlays should be hidden when this screen is entered or resumed.
|
|
|
|
/// </summary>
|
|
|
|
bool HideOverlaysOnEnter { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
2020-08-28 01:29:18 +08:00
|
|
|
/// Whether overlays should be able to be opened when this screen is current.
|
2019-01-28 14:41:54 +08:00
|
|
|
/// </summary>
|
2020-08-30 01:39:50 +08:00
|
|
|
Bindable<OverlayActivation> OverlayActivationMode { get; }
|
2019-01-31 17:10:21 +08:00
|
|
|
|
|
|
|
/// <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; }
|
2019-11-15 12:47:14 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Whether mod rate adjustments are allowed to be applied.
|
|
|
|
/// </summary>
|
|
|
|
bool AllowRateAdjustments { get; }
|
2020-07-14 14:59:20 +08:00
|
|
|
|
2020-07-15 04:14:59 +08:00
|
|
|
/// <summary>
|
2020-07-15 12:08:57 +08:00
|
|
|
/// 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>
|
2020-07-15 12:08:57 +08:00
|
|
|
/// <remarks>
|
|
|
|
/// 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.
|
|
|
|
/// </remarks>
|
2020-07-14 14:59:20 +08:00
|
|
|
bool OnBackButton();
|
2019-01-23 19:52:00 +08:00
|
|
|
}
|
|
|
|
}
|