TSdlMouseButtonEvent
Mouse button event structure (Event.MouseButton.* )
Definition
Unit: Neslib.Sdl3.Events
Properties
Name | Description |
---|---|
Button | The mouse button |
Clicks | 1 for single-click, 2 for double-click, etc. |
IsDown | True if the button is pressed |
Kind | Event kind (TSdlEventKind.MouseButtonUp/Down) |
Mouse | The mouse instance in relative mode, TSdlMouse.Touch for touch events, or nil |
Position | Position, relative to window |
Timestamp | In nanoseconds, populated using SdlGetTicksNS |
Window | The window with mouse focus, if any |
WindowID | The ID of the window with mouse focus, if any |
X | X coordinate, relative to window |
Y | Y coordinate, relative to window |
Property Descriptions
Button
The mouse button
property Button: TSdlMouseButton read GetButton
Type: TSdlMouseButton
Clicks
1 for single-click, 2 for double-click, etc.
property Clicks: Byte read FHandle.clicks
Type: Byte
IsDown
True if the button is pressed
property IsDown: Boolean read FHandle.down
Type: Boolean
Kind
Event kind (TSdlEventKind.MouseButtonUp/Down)
property Kind: TSdlEventKind read GetKind
Type: TSdlEventKind
Mouse
The mouse instance in relative mode, TSdlMouse.Touch for touch events, or nil
property Mouse: TSdlMouse read GetMouse
Type: TSdlMouse
Position
Position, relative to window
property Position: TSdlPointF read GetPosition
Type: TSdlPointF
Timestamp
In nanoseconds, populated using SdlGetTicksNS
property Timestamp: UInt64 read FHandle.timestamp
Type: UInt64
Window
The window with mouse focus, if any
property Window: TSdlWindow read GetWindow
Type: TSdlWindow
WindowID
The ID of the window with mouse focus, if any
property WindowID: TSdlWindowID read FHandle.windowID
Type: TSdlWindowID
X
X coordinate, relative to window
property X: Single read FHandle.x
Type: Single
Y
Y coordinate, relative to window
property Y: Single read FHandle.y
Type: Single