mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Merge pull request #3259 from peppy/add-precision-documentation
Add xmldoc for precision / scrolling events
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user