carb::input::subscribeToMouseEvents
Defined in carb/input/InputUtils.h
-
template<typename Functor>
inline SubscriptionId carb::input::subscribeToMouseEvents(IInput *input, Mouse *mouse, Functor &&functor) Subscribes to the mouse event stream.
- Parameters
input – The IInput interface.
mouse – A Mouse handle, or
nullptr
if subscription to events from all mice is desired.functor – An invocable object to be called on each mouse event. Prototype is
void(const MouseEvent&)
.
- Returns