NAME ==== vg_mouse_pressed() - check whether a mouse-button is pressed SYNOPSIS ======== int vg_mouse_pressed(int button, int type) DESCRIPTION =========== Check a certain mouse-button with this function to figure out whether it is pressed or not. The button argument indicates the mouse-button to be checked: - MOUSE_LEFT: left mouse-button - MOUSE_MIDDLE: middle mouse-button - MOUSE_RIGHT: right mouse-button The type argument is: - LONGKEY: return "pressed" while you press the button - SHORTKEY: return "pressed" only the first time you press it (then you have to release the button and press it again) Example You press the left mouse-button and keep it pressed call to vg_mouse_pressed(MOUSE_LEFT,LONGKEY) returns 1 (pressed) call to vg_mouse_pressed(MOUSE_LEFT,LONGKEY) again returns 1 (pressed) call to vg_mouse_pressed(MOUSE_LEFT,SHORTKEY) returns 1 (pressed) call to vg_mouse_pressed(MOUSE_LEFT,SHORTKEY) returns 0 (not pressed) You release the left mouse-button RETURN VALUE ============ If the button is pressed, it returns 1, if the button is not pressed, it returns 0. SEE ALSO ======== Index Understanding window and key vg_key_discard() vg_key_update() vg_key_pressed() vg_mouse_found() vg_mouse_x() vg_mouse_y() vg_mouse_speed()