natiny_view_get_pressed
C
bool natiny_view_get_pressed(NatinyView view);
Returns whether a view is held: the pointer went down on it or on one of its
pickable descendants and has not been released.
Parameters
| Name |
Type |
Description |
view |
NatinyView |
View handle |
Returns
| Type |
Description |
bool |
true from the press until the release, wherever the pointer is in between |
Example
C
float x, y, w, h;
natiny_view_get_rect(self, &x, &y, &w, &h);
if (natiny_view_get_pressed(self)) y += 1.0f;
natiny_render_rectangle(x, y, w, h);