Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
WidgetPointerEventArgs.cs
1using System.Drawing;
2using System.Numerics;
4
5namespace Gondwana.Widgets;
6
11{
27 View view,
28 PointF screenPositionPx,
30 int clickCount = 0,
31 Vector2 deltaPx = default,
32 long tick = 0,
33 int pointerId = 0)
34 : base(widget, tick)
35 {
36 View = view ?? throw new ArgumentNullException(nameof(view));
37 ScreenPositionPx = screenPositionPx;
38 Button = button;
39 ClickCount = clickCount;
40 DeltaPx = deltaPx;
41 PointerId = pointerId;
42 }
43
47 public View View { get; }
48
53 public PointF WrappedOffsetWorldPx { get; internal set; }
54
58 public PointF ScreenPositionPx { get; }
59
64
68 public int ClickCount { get; }
69
73 public Vector2 DeltaPx { get; }
74
78 public int PointerId { get; }
79
84}
Provides the base implementation for widgets that can be drawn and receive pointer,...
Definition WidgetBase.cs:12
WidgetEventArgs(WidgetBase widget, long tick)
Initializes a new instance of the WidgetEventArgs class.
PointF WrappedOffsetWorldPx
World-space translation of the selected periodic widget instance. Retained throughout pointer capture...
Vector2 DeltaPx
Gets the movement delta in pixels since the previous pointer update.
WidgetPointerEventArgs(WidgetBase widget, View view, PointF screenPositionPx, WidgetPointerButtonEnum button=WidgetPointerButtonEnum.None, int clickCount=0, Vector2 deltaPx=default, long tick=0, int pointerId=0)
Initializes a new instance of the WidgetPointerEventArgs class.
bool IsPrimaryButton
Gets whether the pointer event represents a primary-button interaction.
int ClickCount
Gets the number of clicks associated with this pointer action.
View View
Gets the view through which the pointer interaction was routed.
int PointerId
Gets the identifier of the pointer that produced the event.
PointF ScreenPositionPx
Gets the pointer position in screen pixels.
WidgetPointerButtonEnum Button
Gets the pointer button involved in the interaction.
WidgetPointerButtonEnum
Represents a pointer button used by a widget interaction.