mirror of
https://github.com/ppy/osu.git
synced 2025-02-10 07:33:02 +08:00
ProvidesUserCursor -> ProvidingUserCursor, and update xmldoc
This commit is contained in:
parent
43f8a8e8c5
commit
7c41925144
@ -23,7 +23,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
public bool CanShowCursor;
|
public bool CanShowCursor;
|
||||||
|
|
||||||
public CursorContainer Cursor { get; }
|
public CursorContainer Cursor { get; }
|
||||||
public bool ProvidesUserCursor => true;
|
public bool ProvidingUserCursor => true;
|
||||||
|
|
||||||
public CursorOverrideContainer()
|
public CursorOverrideContainer()
|
||||||
{
|
{
|
||||||
@ -53,7 +53,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newTarget = inputManager.HoveredDrawables.OfType<IProvideCursor>().FirstOrDefault(t => t.ProvidesUserCursor) ?? this;
|
var newTarget = inputManager.HoveredDrawables.OfType<IProvideCursor>().FirstOrDefault(t => t.ProvidingUserCursor) ?? this;
|
||||||
|
|
||||||
if (currentTarget == newTarget)
|
if (currentTarget == newTarget)
|
||||||
return;
|
return;
|
||||||
|
@ -12,14 +12,15 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
public interface IProvideCursor : IDrawable
|
public interface IProvideCursor : IDrawable
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cursor provided by this <see cref="Drawable"/>.
|
/// The cursor provided by this <see cref="IDrawable"/>.
|
||||||
/// May be null if no cursor should be visible.
|
/// May be null if no cursor should be visible.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
CursorContainer Cursor { get; }
|
CursorContainer Cursor { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the cursor provided by this <see cref="Drawable"/> should be displayed as the user's cursor.
|
/// Whether <see cref="Cursor"/> should be displayed as the singular user cursor. This will temporarily hide any other user cursor.
|
||||||
|
/// This value is checked every frame and may be used to control whether multiple cursors are displayed (e.g. watching replays).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool ProvidesUserCursor { get; }
|
bool ProvidingUserCursor { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ namespace osu.Game.Screens.Play
|
|||||||
public int RestartCount;
|
public int RestartCount;
|
||||||
|
|
||||||
public CursorContainer Cursor => RulesetContainer.Cursor;
|
public CursorContainer Cursor => RulesetContainer.Cursor;
|
||||||
public bool ProvidesUserCursor => RulesetContainer?.Cursor != null && !RulesetContainer.HasReplayLoaded;
|
public bool ProvidingUserCursor => RulesetContainer?.Cursor != null && !RulesetContainer.HasReplayLoaded;
|
||||||
|
|
||||||
private IAdjustableClock adjustableSourceClock;
|
private IAdjustableClock adjustableSourceClock;
|
||||||
private FramedOffsetClock offsetClock;
|
private FramedOffsetClock offsetClock;
|
||||||
|
Loading…
Reference in New Issue
Block a user