C4 Engine
C4 Engine API Documentation

InputDevice::GetFirstInputControl

Defined in:  C4Input.h
Returns the first control belonging to an input device.
Prototype

InputControl *GetFirstInputControl(voidconst;

Description
The GetFirstInputControl function returns a pointer to the first input control belonging to an input device. All input devices have at least one input control, so the return value is never nullptr.

Input controls are organized into a tree structure. All of the input controls belonging to an input device can be retrieved by calling the GetFirstInputControl function function and then repeatedly calling the InputDevice::GetNextInputControl function as shown in the following code.
InputControl *control = device->GetFirstInputControl();
do
{
    ...
    control = device->GetNextInputControl(control);
while (control);
See Also

InputDevice::GetNextInputControl

InputDevice::FindInputControl

InputControl