Make Introduce bindable property OverlayActivationMode in OsuScreen

This commit is contained in:
Lucas A
2020-08-27 19:29:18 +02:00
parent 66fb5d4174
commit 5949a281fc
3 changed files with 11 additions and 4 deletions

View File

@ -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)]