on_mouse_stop

The function is executed when the mouse pointer is active and the mouse was held stationary for ½ second. By evaluating the variable mouse_moving you may also find out whether the mouse is held stationary (0) or is moving(1).

Remarks:

The variable mouse_calm may be used to specify a maximum distance in pixels that is still considered to represent immobility (default 3).

Example:

var mpos[2]; 

function store_mouse_pos() { mpos[0] = mouse_cursor.x; mpos[1] = mouse_cursor.y; }

void main() { ...
on_mouse_stop = store_mouse_pos; ...

See also:

on_click, on_mouse, on_joy, on_f1, on_anykey, mouse_calm, mouse_moving

► latest version online