Skip to content

Class PointerEventArgs

Definition

Namespace: StardewUI.Events
Assembly: StardewUI.dll

Base class for any event involving the cursor/pointer, e.g. clicks.

public class PointerEventArgs : StardewUI.Events.BubbleEventArgs, 
    StardewUI.Layout.IOffsettable<StardewUI.Events.PointerEventArgs>

Inheritance
ObjectEventArgsBubbleEventArgs ⇦ PointerEventArgs

Implements
IOffsettable<PointerEventArgs>

Members

Constructors

Name Description
PointerEventArgs(Vector2) Base class for any event involving the cursor/pointer, e.g. clicks.

Properties

Name Description
Handled Whether or not the view receiving the event handled the event. Set to true to prevent bubbling.
(Inherited from BubbleEventArgs)
Position The position, relative to the view receiving the event, of the pointer when the event occurred.

Methods

Name Description
Offset(Vector2) Creates a clone of this instance with an offset applied to its position.

Details

Constructors

PointerEventArgs(Vector2)

Base class for any event involving the cursor/pointer, e.g. clicks.

public PointerEventArgs(Microsoft.Xna.Framework.Vector2 position);
Parameters

position   Vector2
The position, relative to the view receiving the event, of the pointer when the event occurred.


Properties

Position

The position, relative to the view receiving the event, of the pointer when the event occurred.

public Microsoft.Xna.Framework.Vector2 Position { get; }
Property Value

Vector2


Methods

Offset(Vector2)

Creates a clone of this instance with an offset applied to its position.

public StardewUI.Events.PointerEventArgs Offset(Microsoft.Xna.Framework.Vector2 distance);
Parameters

distance   Vector2
The offset distance.

Returns

PointerEventArgs