Display visual settings overlay on PlayerLoader screen

This commit is contained in:
TocoToucan 2018-01-26 23:29:54 +03:00
parent d82835107c
commit ce4122b3c4
1 changed files with 9 additions and 1 deletions

View File

@ -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;