carb::input::subscribeToActionEvents

Defined in carb/input/InputUtils.h

template<typename Functor>
inline SubscriptionId carb::input::subscribeToActionEvents(IInput *input, ActionMappingSetHandle actionMappingSet, const char *actionName, Functor &&functor)

Subscribes to the action event stream for a specified action.

Parameters
  • input – The IInput interface.

  • actionMappingSet – The ActionMappingSet to receive events for.

  • actionName – The action name to receive events for.

  • functor – An invocable object to be called on each event. Prototype is void(const ActionEvent&).

Returns

SubscriptionId.