Class InputSystem

Inheritance Relationships

Base Type

Class Documentation

class legion::application::InputSystem : public legion::core::System<InputSystem>

Public Functions

inline virtual void setup() override

Public Static Functions

static inline math::dvec2 getMousePosition()
static inline math::dvec2 getMouseDelta()
template<class Event>
static inline void createBinding(inputmap::method k, float value = 1)

Creates a Binding of a Key /Axis to the emission of an event in the event bus.

See

inputmap::method for options

Template Parameters
  • Event: The type of event you want to be emitted on the appearance of the action/axis.

Parameters
  • k: The axis/action you want to listen to.

Parameters
  • value: The value you want to map to if your Event is an Axis but the event is a button/key. For instance if you want to map one axis to ‘W/S’ you can make ‘W’ emit 1 and ‘S’ -1.

template<class Event>
static inline void removeBinding(inputmap::method met)

removes a Binding from a method

Template Parameters
  • Event: the Event you want to unbind

Parameters
  • met: the method you want to unbind from