SInputSymbol

C++
struct SInputSymbol {
  enum EType {
    Button,
    Toggle,
    RawAxis,
    Axis,
    Trigger
  };
  const EKeyId keyId;
  const TKeyName name;
  const uint32 devSpecId;
  EInputState state;
  const EType type;
  float value;
  uint32 user;
  EDeviceId deviceId;
  uint8 deviceIndex;
};
File

IInput.h

SInputSymbol::EType Enumeration

Input symbol types.

C++
enum EType {
  Button,
  Toggle,
  RawAxis,
  Axis,
  Trigger
};
File

IInput.h

Members
Members
Description
Button
state == press/hold/release -- value = 0, 1
Toggle
transition state with a press.
RawAxis
state == change -- value = movement of axis.
Axis
state == change -- value = -1.0 to 1.0
Trigger
state == change -- value = 0.0 to 1.0
SInputSymbol::deviceId Data Member
C++
EDeviceId deviceId;
Description

Which device does the symbol belong to.

SInputSymbol::deviceIndex Data Member
C++
uint8 deviceIndex;
Description

Device index - controller 1/2 etc

SInputSymbol::devSpecId Data Member
C++
const uint32 devSpecId;
Description

Device internal id of this symbol (we will use it to look it up).

SInputSymbol::keyId Data Member
C++
const EKeyId keyId;
Description

External id for fast comparison.

SInputSymbol::name Data Member
C++
const TKeyName name;
Description

Human readable name of the event.

SInputSymbol::state Data Member
C++
Description

Current state.

SInputSymbol::type Data Member
C++
const EType type;
Description

Type of this symbol.

SInputSymbol::user Data Member
C++
uint32 user;
Description

Type dependent value (toggle-mask for toggles).

SInputSymbol::value Data Member
C++
float value;
Description

Current value.

SInputSymbol::AssignTo Method
C++
void AssignTo(SInputEvent& event, int modifiers = 0);
SInputSymbol::ChangeEvent Method
C++
void ChangeEvent(float v);
SInputSymbol::PressEvent Method
C++
void PressEvent(bool pressed);
SInputSymbol::SInputSymbol Constructor
C++
SInputSymbol(uint32 devSpecId_, EKeyId keyId_, const TKeyName& name_, EType type_, uint32 user_ = 0);