Welcome to mirror list, hosted at ThFree Co, Russian Federation.

bge.types.SCA_MouseSensor.rst « bge_types « rst « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bbc695e4cbf766972659893e5c9d6f34b189f6ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
SCA_MouseSensor(SCA_ISensor)
============================

.. module:: bge.types

base class --- :class:`SCA_ISensor`

.. class:: SCA_MouseSensor(SCA_ISensor)

   Mouse Sensor logic brick.

   .. attribute:: position

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

      :type: [integer, interger]

   .. attribute:: mode

      sensor mode.

      :type: integer

         * KX_MOUSESENSORMODE_LEFTBUTTON(1)
         * KX_MOUSESENSORMODE_MIDDLEBUTTON(2)
         * KX_MOUSESENSORMODE_RIGHTBUTTON(3)
         * KX_MOUSESENSORMODE_WHEELUP(4)
         * KX_MOUSESENSORMODE_WHEELDOWN(5)
         * KX_MOUSESENSORMODE_MOVEMENT(6)

   .. method:: getButtonStatus(button)

      Get the mouse button status.
 
      :arg button: The code that represents the key you want to get the state of, use one of :ref:`these constants<mouse-keys>`
      :type button: int
      :return: The state of the given key, can be one of :ref:`these constants<input-status>`
      :rtype: int