1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Invert CanShowCursor conditional to fix cursor not showing in VisualTests

This commit is contained in:
smoogipoo 2018-01-16 13:40:02 +09:00
parent e0220de1a5
commit 0459f0a069
2 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,7 @@ namespace osu.Game.Graphics.Cursor
/// <summary>
/// Whether any cursors can be displayed.
/// </summary>
public bool CanShowCursor;
public bool CanShowCursor = true;
public CursorContainer Cursor { get; }
public bool ProvidingUserCursor => true;

View File

@ -157,6 +157,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
CursorOverrideContainer.CanShowCursor = currentScreen?.CursorVisible ?? false;
// hook up notifications to components.
BeatmapManager.PostNotification = n => notifications?.Post(n);
BeatmapManager.GetStableStorage = GetStorageForStableInstall;