|
MouseButton | |
ButtonFlag = MouseButton() | |
Parameters: NONE | |
Returns: ButtonFlag = The Flags of what buttons are being pressed |
|
The MouseButton() function will return the current state of the three mouse buttons. It can not only return the state of the buttons separately, but combinations also. [ Button States ] 0= No buttons are pressed 1= LEFT Mouse button is pressed 2= RIGHT Mouse button is pressed 3= Both the LEFT & RIGHT buttons are pressed 4= MIDDLE/WHEEL button is pressed 5= Both the LEFT & MIDDLE/WHEEL buttons are pressed 6= Both the RIGHT & MIDDLE/WHEEL buttons are pressed 7= All three buttons are being pressed. Those familiar with binary, you should be able to notice that each button state is represented as a separate bit. So you can mask the returned button state values to check the individual state of the buttons. [ Button Bits ] Bit 0 = Left Mouse (Mask Value 1) Bit 1 = Right Mouse (Mask Value 2) Bit 2 = Middle Mouse (Mask Value 4) FACTS: * If your not familiar with binary, or you just want to check the status of the LEFT or RIGHTt mouse buttons on their own, you should look into the LeftMouseButton(), RightMouseButton() and mind MidMouseButton() commands. Mini Tutorial: This examble reads the current button state, then displays some messages about what combination of buttons are pressed.
|
Related Info: | LeftMouseButton | MidMouseButton | MouseMoveX | MouseMoveY | MouseMoveZ | MouseX | MouseY | MouseZ | RightMouseButton : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |