mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09:00
Hide the game-wide cursor on touch input
This commit is contained in:
parent
a0bc376446
commit
daff060c9a
@ -5,6 +5,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
|
using osu.Framework.Input.StateChanges;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Cursor
|
namespace osu.Game.Graphics.Cursor
|
||||||
{
|
{
|
||||||
@ -47,7 +48,10 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (!CanShowCursor)
|
var lastMouseSource = GetContainingInputManager().CurrentState.Mouse.LastSource;
|
||||||
|
bool hasValidInput = lastMouseSource != null && !(lastMouseSource is ISourcedFromTouch);
|
||||||
|
|
||||||
|
if (!hasValidInput || !CanShowCursor)
|
||||||
{
|
{
|
||||||
currentTarget?.Cursor?.Hide();
|
currentTarget?.Cursor?.Hide();
|
||||||
currentTarget = null;
|
currentTarget = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user