2 # Documentation for SCA_MouseSensor
3 from SCA_ISensor import *
5 class SCA_MouseSensor(SCA_ISensor):
7 Mouse Sensor logic brick.
11 @ivar position: current [x,y] coordinates of the mouse, in frame coordinates (pixels)
12 @type position: [integer,interger]
13 @ivar mode: sensor mode: 1=KX_MOUSESENSORMODE_LEFTBUTTON 2=KX_MOUSESENSORMODE_MIDDLEBUTTON
14 3=KX_MOUSESENSORMODE_RIGHTBUTTON 4=KX_MOUSESENSORMODE_WHEELUP
15 5=KX_MOUSESENSORMODE_WHEELDOWN 9=KX_MOUSESENSORMODE_MOVEMENT
21 DEPRECATED: use the position property
22 Gets the x coordinate of the mouse.
25 @return: the current x coordinate of the mouse, in frame coordinates (pixels)
29 DEPRECATED: use the position property
30 Gets the y coordinate of the mouse.
33 @return: the current y coordinate of the mouse, in frame coordinates (pixels).
35 def getButtonStatus(button):
37 Get the mouse button status.
40 @param button: value in GameLogic members KX_MOUSE_BUT_LEFT, KX_MOUSE_BUT_MIDDLE, KX_MOUSE_BUT_RIGHT
43 @return: value in GameLogic members KX_INPUT_NONE, KX_INPUT_NONE, KX_INPUT_JUST_ACTIVATED, KX_INPUT_ACTIVE, KX_INPUT_JUST_RELEASED