SCA_MouseSensor(SCA_ISensor)

base class — SCA_ISensor

class SCA_MouseSensor(SCA_ISensor)

Mouse Sensor logic brick.

position

current [x, y] coordinates of the mouse, in frame coordinates (pixels).

Type

[integer, interger]

mode

sensor mode.

Type

integer

  • KX_MOUSESENSORMODE_LEFTBUTTON(1)

  • KX_MOUSESENSORMODE_MIDDLEBUTTON(2)

  • KX_MOUSESENSORMODE_RIGHTBUTTON(3)

  • KX_MOUSESENSORMODE_BUTTON4(4)

  • KX_MOUSESENSORMODE_BUTTON5(5)

  • KX_MOUSESENSORMODE_BUTTON6(6)

  • KX_MOUSESENSORMODE_BUTTON7(7)

  • KX_MOUSESENSORMODE_WHEELUP(8)

  • KX_MOUSESENSORMODE_WHEELDOWN(9)

  • KX_MOUSESENSORMODE_MOVEMENT(10)

getButtonStatus(button)

Get the mouse button status.

Parameters

button (int) – The code that represents the key you want to get the state of, use one of these constants

Returns

The state of the given key, can be one of these constants

Return type

int