Skip to content

TSdlJoyButtonEvent

Joystick button event structure (Event.JoyButton.* )

Definition

Unit: Neslib.Sdl3.Events

type TSdlJoyButtonEvent = record ... end;

Properties

Name Description
Button The joystick button index
IsDown True if the button is pressed
Joystick The joystick (or nil if not opened)
JoystickID The joystick instance ID
Kind Event kind (TSdlEventKind.JoystickButtonUp/Down)
Timestamp In nanoseconds, populated using SdlGetTicksNS

Property Descriptions

Button

The joystick button index

property Button: Byte read FHandle.button

Type: Byte


IsDown

True if the button is pressed

property IsDown: Boolean read FHandle.down

Type: Boolean


Joystick

The joystick (or nil if not opened)

property Joystick: TSdlJoystick read GetJoystick

Type: TSdlJoystick


JoystickID

The joystick instance ID

property JoystickID: TSdlJoystickID read GetJoystickID

Type: TSdlJoystickID


Kind

Event kind (TSdlEventKind.JoystickButtonUp/Down)

property Kind: TSdlEventKind read GetKind

Type: TSdlEventKind


Timestamp

In nanoseconds, populated using SdlGetTicksNS

property Timestamp: UInt64 read FHandle.timestamp

Type: UInt64