GLBasic User Manual

Main sections

GETMOUSECOUNT()

num% = GETMOUSECOUNT()



Returns the number of mice attached to the system. This extension will be implemented on Windows 7 and the new xserver-xorg.
So far only the platform "IPHONE" will return a value different to 1.

For systems with multiple mouse devices, use SETACTIVEMOUSE to pick one of these "mice" before checking its position / button presses with MOUSESTATE.

WHILE TRUE
FOR i=0 TO GETMOUSECOUNT()-1
SETACTIVEMOUSE i
MOUSESTATE mx, my, b1, b2
IF b1
PRINT "_____"+i, mx, my
ENDIF
NEXT
SHOWSCREEN
WEND

See also...