Skip to content

Gamepad_set_color

hugh greene edited this page Jun 20, 2022 · 1 revision

Description

Sets the color of the LED indicator for the given gamepad device. Acceptable values include Color constants or HEX color values. This function only applies to certain gamepad devices such as the PlayStation controller because Xbox controllers do not have this functionality. For this reason, the XInput extension does nothing when this function is called.

Parameters

Parameter Data Type Description
device integer The gamepad index, must be 0 through 3, 0 being player 1.
color integer Color constants or HEX color value.

Return Values

void: This function does not return anything.

Example Call

// demonstrates setting the LED indicator on player 1's controller to red
gamepad_set_color(0, c_red);

NOTOC

Clone this wiki locally