diff --git a/osu.Game/Modes/UI/HudOverlay.cs b/osu.Game/Modes/UI/HudOverlay.cs index 215715c526..4a2f8f0c41 100644 --- a/osu.Game/Modes/UI/HudOverlay.cs +++ b/osu.Game/Modes/UI/HudOverlay.cs @@ -12,6 +12,8 @@ using System; using osu.Game.Modes.Scoring; using osu.Framework.Input; using OpenTK.Input; +using osu.Game.Overlays; +using osu.Game.Overlays.Notifications; namespace osu.Game.Modes.UI { @@ -26,8 +28,6 @@ namespace osu.Game.Modes.UI private Bindable showKeyCounter; private Bindable showHud; - public bool IsVisible => showHud; - protected abstract KeyCounterCollection CreateKeyCounter(); protected abstract ComboCounter CreateComboCounter(); protected abstract PercentageCounter CreateAccuracyCounter(); @@ -49,8 +49,8 @@ namespace osu.Game.Modes.UI }; } - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) + [BackgroundDependencyLoader(true)] + private void load(OsuConfigManager config, NotificationManager notificationManager) { showKeyCounter = config.GetBindable(OsuConfig.KeyOverlay); showKeyCounter.ValueChanged += keyCounterVisibilityChanged; @@ -59,6 +59,14 @@ namespace osu.Game.Modes.UI showHud = config.GetBindable(OsuConfig.ShowInterface); showHud.ValueChanged += hudVisibilityChanged; showHud.TriggerChange(); + + if (!showHud) + { + notificationManager?.Post(new SimpleNotification + { + Text = @"The score overlay is currently disabled. You can toogle this by pressing Shift + Tab." + }); + } } private void keyCounterVisibilityChanged(object sender, EventArgs e) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index e774dea1a6..73d397b24b 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -22,8 +22,6 @@ using osu.Game.Screens.Ranking; using System; using System.Linq; using osu.Game.Modes.Scoring; -using osu.Game.Overlays; -using osu.Game.Overlays.Notifications; namespace osu.Game.Screens.Play { @@ -61,8 +59,8 @@ namespace osu.Game.Screens.Play private HudOverlay hudOverlay; private PauseOverlay pauseOverlay; - [BackgroundDependencyLoader(true)] - private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuConfigManager config, NotificationManager notificationManager) + [BackgroundDependencyLoader] + private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuConfigManager config) { var beatmap = Beatmap.Beatmap; @@ -160,14 +158,6 @@ namespace osu.Game.Screens.Play hudOverlay, pauseOverlay }; - - if (!hudOverlay.IsVisible) - { - notificationManager?.Post(new SimpleNotification - { - Text = @"The score overlay is currently disabled. You can toogle this by pressing Shift + Tab." - }); - } } private void initializeSkipButton()