natiny_input_get_wheel_y
float natiny_input_get_wheel_y(void);
Returns the accumulated vertical wheel movement since the last frame, in
notches. Every wheel event reported between frames contributes to the result.
One detent of an ordinary mouse is 1.0f; a trackpad sends many smaller
numbers. The value is independent of the window's scale mode and uses the same
unit on the desktop and in a browser. Positive is away from the user.
Returns
| Type | Description |
|---|---|
float |
Notches turned this frame; 0.0f when it did not |
Example
/* scroll a list, three lines to a notch */
offset -= natiny_input_get_wheel_y() * 3.0f;
Notes
- A finger on a touch screen does not turn the wheel. Read
natiny_input_get_touch_y_speedfor that.