C4 Engine
C4 Engine API Documentation

class ButtonControl

Defined in:  C4Input.h
Encapsulates a button input control.
Definition

class ButtonControl : public InputControl

Description
The ButtonControl class is the base class for all input controls that are buttons.

If an action is assigned to a ButtonControl object, an internal counter for the action is incremented when the button is pressed, and it is decremented when the button is released. When the counter is incremented to 1, the action's Action::HandleEngage function is called, and when the counter is decremented to 0, the action's Action::HandleDisengage function is called. This mechanism allows an action to be assigned to multiple buttons without redundant events being reported.
Base Classes
InputControl A ButtonControl is a specific type of input control.
See Also

Action::HandleEngage

Action::HandleDisengage