Back to index
|Input (InputType ntype, int nid0, int nid1=0, int nid2=0)|
|Creates an Input instance which represents an arbitrary way of getting game input using a type specifier and 3 integers. |
Creates an Input instance which represents an arbitrary way of getting game input using a type specifier and 3 integers.
Meaning of the 3 integers for each InputType: IT_NONE: This means nothing. In certain cases this is regarded as an unset binding. IT_KEYBOARD: id0 is an SDLKey value. IT_STICKMOTION: id0 - stick index, id1 - axis index, id2 - axis direction (negative, positive). You can assume that axis 0 is the X-Axis where the negative direction is to the left and that axis 1 is the Y-Axis with the negative direction being upwards. IT_STICKBUTTON: id0 - stick index, id1 - button index. Button 0 and 1 are usually reached most easily. IT_STICKHAT: This is not yet implemented. IT_MOUSEMOTION: id0 - axis index (0 -> X, 1 -> Y). Mouse wheel is represented as buttons! IT_MOUSEBUTTON: id0 - button number (1 -> left, 2 -> middle, 3 -> right, ...)
Note: For joystick bindings that are actice in the menu the joystick's index should be zero. The binding will react to all joysticks connected to the system.