natiny_input_get_mouse_y
int natiny_input_get_mouse_y(void);
Returns the mouse cursor's Y coordinate relative to the window's top edge.
Returns
| Type | Description |
|---|---|
int |
Mouse cursor Y coordinate in drawing units |
Example
int y = natiny_input_get_mouse_y();
Notes
- Y increases downward from the top edge.
- On desktop, input state is global across windows. The coordinate is relative to the window that produced the most recent cursor event. On web it is relative to the single canvas.
- The result uses the same units as 2D drawing: window pixels in
NATINY_SCALE_MODE_PIXELS, and display-scaled drawing units inNATINY_SCALE_MODE_STRETCHandNATINY_SCALE_MODE_HIDPI.