A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using osu.Framework.Input.States;
5using osuTK;
6
7namespace osu.Framework.Input.StateChanges.Events
8{
9 public class MouseScrollChangeEvent : InputStateChangeEvent
10 {
11 /// <summary>
12 /// The absolute value of scroll prior to this change.
13 /// </summary>
14 public readonly Vector2 LastScroll;
15
16 /// <summary>
17 /// Whether the change came from a device supporting precision scrolling.
18 /// </summary>
19 /// <remarks>
20 /// 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).
21 /// </remarks>
22 public readonly bool IsPrecise;
23
24 public MouseScrollChangeEvent(InputState state, IInput input, Vector2 lastScroll, bool isPrecise)
25 : base(state, input)
26 {
27 LastScroll = lastScroll;
28 IsPrecise = isPrecise;
29 }
30 }
31}