TSdlMouseWheelEvent
Mouse wheel event structure (Event.MouseWheel.* )
Definition
Unit: Neslib.Sdl3.Events
Properties
Name | Description |
---|---|
Amount | The amount scrolled. |
Direction | When TSdlMouseWheelDirection.Flipped the values in X and Y will be opposite. Multiply by -1 to change them back |
Kind | Event kind (TSdlEventKind.MouseWheel) |
Mouse | The mouse instance in relative mode or nil |
MouseX | X coordinate, relative to window |
MouseY | Y coordinate, relative to window |
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 | The amount scrolled horizontally, positive to the right and negative to the left |
Y | The amount scrolled vertically, positive away from the user and negative toward the user |
Property Descriptions
Amount
The amount scrolled.
property Amount: TSdlPointF read GetAmount
Type: TSdlPointF
Direction
When TSdlMouseWheelDirection.Flipped the values in X and Y will be opposite. Multiply by -1 to change them back
property Direction: TSdlMouseWheelDirection read GetDirection
Type: TSdlMouseWheelDirection
Kind
Event kind (TSdlEventKind.MouseWheel)
property Kind: TSdlEventKind read GetKind
Type: TSdlEventKind
Mouse
The mouse instance in relative mode or nil
property Mouse: TSdlMouse read GetMouse
Type: TSdlMouse
MouseX
X coordinate, relative to window
property MouseX: Single read FHandle.mouse_x
Type: Single
MouseY
Y coordinate, relative to window
property MouseY: Single read FHandle.mouse_y
Type: Single
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
The amount scrolled horizontally, positive to the right and negative to the left
property X: Single read FHandle.x
Type: Single
Y
The amount scrolled vertically, positive away from the user and negative toward the user
property Y: Single read FHandle.y
Type: Single