> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XFrontPanelSetLightStates

> XFrontPanelSetLightStates

# XFrontPanelSetLightStates

Sets the states of the front panel lights.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT XFrontPanelSetLightStates(  
         XFrontPanelLight lights  
)  
```

<a id="parametersSection" />

### Parameters

*lights*   \_In\_\
Type: [XFrontPanelLight](/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight)

Value that specifies the new states of the front panel lights.

<a id="retvalSection" />

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an error code.

<a id="remarksSection" />

## Remarks

The front panel of the XBOX One X dev kit includes five lights that correspond to the five programmable buttons.

<img src="https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/front_panel_display_small.png?fit=max&auto=format&n=-_0FrcE2bDxzGxv-&q=85&s=8c81bf256714cec6526e83a4cbac5538" alt="Front panel display of the XBOX One X" width="704" height="362" data-path="images/gdk/reference/front_panel_display_small.png" />

For the *lights* parameter, combine values from the [XFrontPanelLight](/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight) enumeration by using the bitwise OR operator.

To get the current states of the front panel lights, use [XFrontPanelGetLightStates](/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetlightstates).

For more information, see [XBOX One X: Using the front panel display (NDA topic)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/dev-kits/concepts/scorpio-frontpanel).

<a id="requirementsSection" />

## Requirements

**Header:** xfrontpaneldisplay.h

**Library:** xfrontpaneldisplay.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

[XFrontPanelDisplay](/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members)


## Related topics

- [XFrontPanelLight](/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md)
- [XFrontPanelGetLightStates](/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetlightstates.md)
- [XFrontPanelDisplay](/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)
- [XFrontPanelGetButtonStates](/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetbuttonstates.md)
- [XFrontPanelButton](/reference/devkit/xfrontpaneldisplay/enums/xfrontpanelbutton.md)
