active
gesture.active()
Returns true
if the area is being pressed (click or hold).
gesture.active(area)
area
Array
Defines the interactive area where the user's interaction is evaluated. Can be represented in three formats:
Rectangle: [x, y, w, h]
: Where x
& y
are the top-left coordinates, w
is width and h
is height.
Polygon: [x1, y1, x2, y2, x3, y3, ...]
: A sequence of coordinates forming the polygon vertices. Must have at least three points (6 values).
Circle: [x, y, rad]: Where x
& y
are the circle's center, and rad
is its radius.