From 3ea13b1ade846820c94bcf70cd72d8bc1f12d0f7 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Fri, 15 Feb 2019 16:55:39 +0900 Subject: [PATCH] Fix mouse cursor appearing prematurely during startup --- osu.Game/OsuGame.cs | 5 +++++ osu.Game/Screens/Loader.cs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index ad6411a2d6..7b4ff3d295 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -337,6 +337,11 @@ namespace osu.Game { base.LoadComplete(); + // The next time this is updated is in UpdateAfterChildren, which occurs too late and results + // in the cursor being shown for a few frames during the intro. + // This prevents the cursor from showing until we have a screen with CursorVisible = true + MenuCursorContainer.CanShowCursor = menuScreen?.CursorVisible ?? false; + // todo: all archive managers should be able to be looped here. SkinManager.PostNotification = n => notifications?.Post(n); SkinManager.GetStableStorage = GetStorageForStableInstall; diff --git a/osu.Game/Screens/Loader.cs b/osu.Game/Screens/Loader.cs index 9703d79442..0db0f1a1a3 100644 --- a/osu.Game/Screens/Loader.cs +++ b/osu.Game/Screens/Loader.cs @@ -21,6 +21,8 @@ namespace osu.Game.Screens public override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled; + public override bool CursorVisible => false; + protected override bool AllowBackButton => false; public Loader()