From ce4122b3c4240718d47f1bf87504ffd7381971be Mon Sep 17 00:00:00 2001 From: TocoToucan Date: Fri, 26 Jan 2018 23:29:54 +0300 Subject: [PATCH] Display visual settings overlay on PlayerLoader screen --- osu.Game/Screens/Play/PlayerLoader.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index cf6c252bec..2950990779 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -13,6 +13,7 @@ using OpenTK; using osu.Framework.Localisation; using osu.Game.Screens.Menu; +using osu.Game.Screens.Play.PlayerSettings; namespace osu.Game.Screens.Play { @@ -21,6 +22,7 @@ public class PlayerLoader : OsuScreen private Player player; private BeatmapMetadataDisplay info; + private VisualSettings visualSettings; private bool showOverlays = true; public override bool ShowOverlaysOnEnter => showOverlays; @@ -49,6 +51,12 @@ private void load() Anchor = Anchor.Centre, Origin = Anchor.Centre, }); + Add(visualSettings = new VisualSettings + { + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight, + Margin = new MarginPadding(25) + }); LoadComponentAsync(player); } @@ -110,7 +118,7 @@ protected override void LogoArriving(OsuLogo logo, bool resuming) private void pushWhenLoaded() { - if (player.LoadState != LoadState.Ready) + if (player.LoadState != LoadState.Ready || visualSettings.IsHovered) { Schedule(pushWhenLoaded); return;