natiny_input_get_mouse_x

C
int natiny_input_get_mouse_x(void);

Returns the mouse cursor's X coordinate relative to the window's left edge.

Returns

Type Description
int Mouse cursor X coordinate in drawing units

Example

C
int x = natiny_input_get_mouse_x();

Notes

  • 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.