runInputActionHandler

Uniform wrapper over the varied set of input action handler variants.

This is an alternative, newer set of overloads for handling input actions with support for passing event metadata through resources.

Parameters

action T

Evaluated input action type. Presently, this is an enum member of the input action it comes from. InputActionID cannot be used here.

handler void delegate
()
@safe

Handler for the action. The handler may choose to return a boolean, indicating if it handled (true) or ignored the action (false).

It may also optionally accept the input action enum, for example FluidInputAction, if all of its events are bound to its members (like FluidInputAction.press).

It may accept a resource type if the resource has a static fetch(IO, int) method.

Return Value

Type: bool

True if the handler responded to this action, false if not.

Meta