1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 04:02:59 +08:00

Merge pull request #3296 from peppy/fix-notifications-too-early

Fix notifications appearing too early in load process
This commit is contained in:
Dean Herbert 2018-08-24 15:09:03 +09:00 committed by GitHub
commit 5ec1a5a774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 12 deletions

View File

@ -96,8 +96,7 @@ namespace osu.Game.Overlays
base.LoadComplete(); base.LoadComplete();
StateChanged += _ => updateProcessingMode(); StateChanged += _ => updateProcessingMode();
OverlayActivationMode.ValueChanged += _ => updateProcessingMode(); OverlayActivationMode.BindValueChanged(_ => updateProcessingMode(), true);
OverlayActivationMode.TriggerChange();
} }
private int totalCount => sections.Select(c => c.DisplayedCount).Sum(); private int totalCount => sections.Select(c => c.DisplayedCount).Sum();

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics.Shaders;
using osu.Game.Screens.Menu; using osu.Game.Screens.Menu;
using OpenTK; using OpenTK;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Game.Overlays;
namespace osu.Game.Screens namespace osu.Game.Screens
{ {
@ -18,6 +19,8 @@ namespace osu.Game.Screens
protected override bool HideOverlaysOnEnter => true; protected override bool HideOverlaysOnEnter => true;
protected override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
protected override bool AllowBackButton => false; protected override bool AllowBackButton => false;
public Loader() public Loader()

View File

@ -174,6 +174,9 @@ namespace osu.Game.Screens.Menu
ButtonSystemState lastState = state; ButtonSystemState lastState = state;
state = value; state = value;
if (game != null)
game.OverlayActivationMode.Value = state == ButtonSystemState.Exit ? OverlayActivation.Disabled : OverlayActivation.All;
updateLogoState(lastState); updateLogoState(lastState);
Logger.Log($"{nameof(ButtonSystem)}'s state changed from {lastState} to {state}"); Logger.Log($"{nameof(ButtonSystem)}'s state changed from {lastState} to {state}");
@ -205,11 +208,7 @@ namespace osu.Game.Screens.Menu
{ {
logoTracking = false; logoTracking = false;
if (game != null) game?.Toolbar.Hide();
{
game.OverlayActivationMode.Value = state == ButtonSystemState.Exit ? OverlayActivation.Disabled : OverlayActivation.All;
game.Toolbar.Hide();
}
logo.ClearTransforms(targetMember: nameof(Position)); logo.ClearTransforms(targetMember: nameof(Position));
logo.RelativePositionAxes = Axes.Both; logo.RelativePositionAxes = Axes.Both;
@ -243,11 +242,7 @@ namespace osu.Game.Screens.Menu
if (impact) if (impact)
logo.Impact(); logo.Impact();
if (game != null) game?.Toolbar.Show();
{
game.OverlayActivationMode.Value = OverlayActivation.All;
game.Toolbar.State = Visibility.Visible;
}
}, 200); }, 200);
break; break;
default: default: