Merge pull request #3259 from peppy/add-precision-documentation

Add xmldoc for precision / scrolling events
This commit is contained in:
Dean Herbert
2020-02-14 16:18:37 +09:00
committed by GitHub
3 changed files with 23 additions and 1 deletions

View File

@@ -12,7 +12,17 @@ namespace osu.Framework.Input.Events
/// </summary>
public class ScrollEvent : MouseEvent
{
/// <summary>
/// The relative change in scroll associated with this event.
/// </summary>
public readonly Vector2 ScrollDelta;
/// <summary>
/// Whether the change came from a device supporting precision scrolling.
/// </summary>
/// <remarks>
/// In cases this is true, scroll events will generally map 1:1 to user's input, rather than incrementing in large "notches" (as expected of traditional scroll wheels).
/// </remarks>
public readonly bool IsPrecise;
public ScrollEvent(InputState state, Vector2 scrollDelta, bool isPrecise = false)

View File

@@ -8,8 +8,17 @@ namespace osu.Framework.Input.StateChanges.Events
{
public class MouseScrollChangeEvent : InputStateChangeEvent
{
/// <summary>
/// The absolute value of scroll prior to this change.
/// </summary>
public readonly Vector2 LastScroll;
/// <summary>
/// Whether the change came from a device supporting precision scrolling.
/// </summary>
/// <remarks>
/// In cases this is true, scroll events will generally map 1:1 to user's input, rather than incrementing in large "notches" (as expected of traditional scroll wheels).
/// </remarks>
public readonly bool IsPrecise;
public MouseScrollChangeEvent(InputState state, IInput input, Vector2 lastScroll, bool isPrecise)

View File

@@ -19,8 +19,11 @@ namespace osu.Framework.Input.StateChanges
public Vector2 Delta;
/// <summary>
/// Whether the change occurred as the result of a precise scroll.
/// Whether the change came from a device supporting precision scrolling.
/// </summary>
/// <remarks>
/// In cases this is true, scroll events will generally map 1:1 to user's input, rather than incrementing in large "notches" (as expected of traditional scroll wheels).
/// </remarks>
public bool IsPrecise;
public void Apply(InputState state, IInputStateChangeHandler handler)