Back to index

supertuxkart  0.5+dfsg1
Public Member Functions | Public Attributes
Input Struct Reference

#include <input.hpp>

List of all members.

Public Member Functions

 Input ()
 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.

Public Attributes

InputType type
int id0
int id1
int id2

Detailed Description

Definition at line 40 of file input.hpp.


Constructor & Destructor Documentation

Input::Input ( ) [inline]

Definition at line 50 of file input.hpp.

              : type(IT_NONE), id0(0), id1(0), id2(0)
       {
              // Nothing to do.
       }
Input::Input ( InputType  ntype,
int  nid0,
int  nid1 = 0,
int  nid2 = 0 
) [inline]

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.

Definition at line 79 of file input.hpp.

              : type(ntype), id0(nid0), id1(nid1), id2(nid2)
       {
              // Nothing to do.
       }

Member Data Documentation

Definition at line 43 of file input.hpp.

Definition at line 44 of file input.hpp.

Definition at line 45 of file input.hpp.

Definition at line 42 of file input.hpp.


The documentation for this struct was generated from the following file: