|
Size: 1394
Comment: Added Some Information
|
Size: 1721
Comment: add 'which' field
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 13: | Line 13: |
| ||Uint32||'''which'''||the mouse instance id, or SDL_TOUCH_MOUSEID; see [[#Remarks|Remarks]] for details|| | |
| Line 28: | Line 29: |
| '''which''' may be SDL_TOUCH_MOUSEID, for events that were generated by a touch input device, and not a real mouse. You might want to ignore such events, if your application already handles [[SDL_TouchFingerEvent]]. |
DRAFT |
SDL_MouseWheelEvent
A structure that contains mouse wheel event information.
Contents
Data Fields
Uint32 |
type |
SDL_MOUSEWHEEL |
Uint32 |
windowID |
the window with mouse focus, if any |
Uint32 |
which |
the mouse instance id, or SDL_TOUCH_MOUSEID; see Remarks for details |
int |
x |
the amount scrolled horizontally |
int |
y |
the amount scrolled vertically |
Code Examples
You can add your code example here
Remarks
SDL_MouseWheelEvent is a member of the SDL_Event union and is used when an event of type SDL_MOUSEWHEEL is reported. You would access it through the event's wheel field.
An SDL_MOUSEWHEEL event occurs whenever a user moves the mouse wheel.
Movements to the left generate negative x values and to the right generate positive x values. Movements up (scroll forward) generate negative y values and down (scroll backward) generate positive y values. green
red
which may be SDL_TOUCH_MOUSEID, for events that were generated by a touch input device, and not a real mouse. You might want to ignore such events, if your application already handles SDL_TouchFingerEvent.
Related Enumerations
