New in 2.2.0
N/A
Type | Description |
int[3] | A list of 3 ints corresponding to the left, right and middle mouse button states. |
Retrieves the mouse button states this frame. All values where the button is held are truthy.
Name | Description |
CLICK | Button became pressed this frame |
DOWN | Button is pressed |
UP | Button is released |
import agan
class game():
def create(self):
return self
#
def update(self):
b = agan.getbuttons()
#
if(b[0] == agan.CLICK): agan.log('LMB was clicked')
#
if(b[1] == agan.DOWN): agan.log('RMB is held')
#
if(b[2] == agan.UP): agan.log('MMB is not held')
#
def close(self):
pass