C4 Engine
C4 Engine API Documentation

class DirectionalControl

Defined in:  C4Input.h
Encapsulates a directional pad input control.
Definition

class DirectionalControl : public InputControl

Description
The DirectionalControl class represents an input control that is a directional pad.

If an action is assigned to a DirectionalControl object, then the action's Action::HandleMove function is called when the state of the directional pad changes. If the user lets go of the directional pad (allowing it to return to the center position), then the value passed to the HandleMove function is −1. Otherwise, the value is in the range [0, 7], where 0 corresponds to straight up, and higher values represent directions in 45-degree increments moving clockwise. For instance, 1 corresponds to halfway between right and up, 2 means directly to the right, and 6 means directly to the left.
Base Classes
InputControl A DirectionalControl is a specific type of input control.
See Also

Action::HandleMove