natiny_input_get_mouse_button_pressed
bool natiny_input_get_mouse_button_pressed(uint32_t button);
Returns true only on the frame when the specified mouse button was first pressed down.
Parameters
| Name | Type | Description |
|---|---|---|
button |
uint32_t |
Mouse button - a NATINY_INPUT_MOUSE_BUTTON_* constant |
Returns
| Type | Description |
|---|---|
bool |
true on the frame the button was pressed, false otherwise |
Example
if (natiny_input_get_mouse_button_pressed(NATINY_INPUT_MOUSE_BUTTON_LEFT))
select_item();
Notes
- Returns
truefor the frame that consumes a released-to-pressed transition.