FluidHoverable.inputActionImpl

Handle input actions. This function is called by runInputAction and can be overriden to preprocess input actions in some cases.

interface FluidHoverable
bool
inputActionImpl
(
immutable InputActionID id
,
bool active
)

Parameters

id InputActionID

ID of the action to run.

active bool

Actions trigger many times while the corresponding key or button is held down, but usually only one of these triggers is interesting — in which case this value will be true. This trigger will be the one that runs all UDA handler functions.

Return Value

Type: bool

* true if the handler took care of the action; processing of the action will finish. * false if the action should be handled by the default input action handler.

Examples

Override a specific action by running a different input action.

override bool inputActionImpl(InputActionID id, bool active) {

    if (active && id == InputActionID.from!(FluidInputAction.press)) {

        return runInputAction!(FluidInputAction.press);

    }

    return false;

}

Meta