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 TouchStateChangeEvent : InputStateChangeEvent
10 {
11 /// <summary>
12 /// The current <see cref="Touch"/> value.
13 /// </summary>
14 public readonly Touch Touch;
15
16 /// <summary>
17 /// Whether the <see cref="Touch"/> became active, or null if no activity change occurred.
18 /// </summary>
19 public readonly bool? IsActive;
20
21 /// <summary>
22 /// The last position of this <see cref="Touch"/>, or null if no position change occurred.
23 /// </summary>
24 public readonly Vector2? LastPosition;
25
26 public TouchStateChangeEvent(InputState state, IInput input, Touch touch, bool? active, Vector2? lastPosition)
27 : base(state, input)
28 {
29 Touch = touch;
30
31 IsActive = active;
32 LastPosition = lastPosition;
33 }
34 }
35}