Class ButtonEventArgs
Definition
Namespace: StardewUI.Events
Assembly: StardewUI.dll
Event arguments for an event relating to a button (or key) of some input device.
public class ButtonEventArgs : StardewUI.Events.PointerEventArgs,
StardewUI.Layout.IOffsettable<StardewUI.Events.ButtonEventArgs>
Inheritance
Object ⇦ EventArgs ⇦ BubbleEventArgs ⇦ PointerEventArgs ⇦ ButtonEventArgs
Implements
IOffsettable<ButtonEventArgs>
Members
Constructors
Name | Description |
---|---|
ButtonEventArgs(Vector2, SButton) | Event arguments for an event relating to a button (or key) of some input device. |
Properties
Name | Description |
---|---|
Button | The button that triggered the event. |
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. (Inherited from PointerEventArgs) |
Methods
Name | Description |
---|---|
Offset(Vector2) | Creates a clone of this instance with an offset applied to its position. |
Details
Constructors
ButtonEventArgs(Vector2, SButton)
Event arguments for an event relating to a button (or key) of some input device.
Parameters
position
Vector2
The position of the mouse cursor when the button was pressed.
button
SButton
The button that triggered the event.
Properties
Button
The button that triggered the event.
Property Value
SButton
Methods
Offset(Vector2)
Creates a clone of this instance with an offset applied to its position.
Parameters
distance
Vector2
The offset distance.