VgaGames4

VgaGames4 - input man-pages

[.. upper level ..]

# vg4->input->mouse_newpressed()

Return pressed mouse-buttons which have not yet been queried.

SYNTAX
VG_BOOL vg4->input->mouse_newpressed(VG_BOOL *left, VG_BOOL *middle, VG_BOOL *right)
FUNCTION PARAMETERS

left | For returning whether left button is new pressed, (may be NULL)
middle | For returning whether middle button is new pressed, (may be NULL)
right | For returning whether right button is new pressed, (may be NULL)

RETURN VALUE
Returns whether one or more buttons are new pressed: - VG_TRUE: Yes - VG_FALSE: No
DESCRIPTION
Return pressed mouse-buttons which have not yet been queried. As soon as a mouse button has been queried with this function, the next call of this function will return VG_FALSE for this button. If mouse-grabbing is activated, the mouse must be catched in the window. To catch the mouse into the window or release it from the window, if mouse-grabbing is activated, use: [CTRL]+[Backspace]
EXAMPLE

    /* assumed left and right button are being pressed */

    VG_BOOL left, middle, right;

    vg4->input->mouse_newpressed(&left, &middle, NULL);
    /* now left is VG_TRUE, middle is VG_FALSE */

    vg4->input->mouse_newpressed(&left, &middle, &right);
    /* now left is VG_FALSE, middle is VG_FALSE, right is VG_TRUE */

    vg4->input->mouse_newpressed(&left, &middle, &right);
    /* now left is VG_FALSE, middle is VG_FALSE, right is VG_FALSE */

SEE ALSO
vg4->input->mouse_pressed() vg4->nw->mouse_newpressed()