expose two Bindables with split logic instead of one with mixed logic

This commit is contained in:
Aergwyn
2018-05-21 15:53:50 +02:00
parent 1482bca147
commit b7e3ea348b
12 changed files with 43 additions and 26 deletions

View File

@ -77,7 +77,8 @@ namespace osu.Game
public float ToolbarOffset => Toolbar.Position.Y + Toolbar.DrawHeight;
public readonly BindableBool AllowOverlays = new BindableBool();
public readonly BindableBool HideOverlaysOnEnter = new BindableBool();
public readonly BindableBool AllowOpeningOverlays = new BindableBool(true);
private OsuScreen screenStack;
@ -367,12 +368,12 @@ namespace osu.Game
settings.StateChanged += _ => updateScreenOffset();
notifications.StateChanged += _ => updateScreenOffset();
notifications.Enabled.BindTo(AllowOverlays);
notifications.Enabled.BindTo(AllowOpeningOverlays);
AllowOverlays.ValueChanged += show =>
HideOverlaysOnEnter.ValueChanged += hide =>
{
//central game screen change logic.
if (!show)
if (hide)
{
hideAllOverlays();
musicController.State = Visibility.Hidden;