mirror of
https://github.com/ppy/osu
synced 2024-12-25 08:12:41 +00:00
Make Introduce bindable property OverlayActivationMode in OsuScreen
This commit is contained in:
parent
66fb5d4174
commit
5949a281fc
@ -972,9 +972,12 @@ namespace osu.Game
|
||||
break;
|
||||
}
|
||||
|
||||
if (current is IOsuScreen currentOsuScreen)
|
||||
OverlayActivationMode.UnbindFrom(currentOsuScreen.OverlayActivationMode);
|
||||
|
||||
if (newScreen is IOsuScreen newOsuScreen)
|
||||
{
|
||||
OverlayActivationMode.Value = newOsuScreen.InitialOverlayActivationMode;
|
||||
OverlayActivationMode.BindTo(newOsuScreen.OverlayActivationMode);
|
||||
|
||||
MusicController.AllowRateAdjustments = newOsuScreen.AllowRateAdjustments;
|
||||
|
||||
|
@ -39,9 +39,9 @@ namespace osu.Game.Screens
|
||||
bool HideOverlaysOnEnter { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether overlays should be able to be opened once this screen is entered or resumed.
|
||||
/// Whether overlays should be able to be opened when this screen is current.
|
||||
/// </summary>
|
||||
OverlayActivation InitialOverlayActivationMode { get; }
|
||||
public Bindable<OverlayActivation> OverlayActivationMode { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The amount of parallax to be applied while this screen is displayed.
|
||||
|
@ -44,10 +44,12 @@ namespace osu.Game.Screens
|
||||
public virtual bool HideOverlaysOnEnter => false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether overlays should be able to be opened once this screen is entered or resumed.
|
||||
/// The initial initial overlay activation mode to use when this screen is entered for the first time.
|
||||
/// </summary>
|
||||
public virtual OverlayActivation InitialOverlayActivationMode => OverlayActivation.All;
|
||||
|
||||
public Bindable<OverlayActivation> OverlayActivationMode { get; }
|
||||
|
||||
public virtual bool CursorVisible => true;
|
||||
|
||||
protected new OsuGameBase Game => base.Game as OsuGameBase;
|
||||
@ -138,6 +140,8 @@ namespace osu.Game.Screens
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
OverlayActivationMode = new Bindable<OverlayActivation>(InitialOverlayActivationMode);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
|
Loading…
Reference in New Issue
Block a user