> ## 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.

# XFrontPanelButton

> XFrontPanelButton

# XFrontPanelButton

枚举正面板按钮，包括方向按钮 (D-pad)。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
enum class XFrontPanelButton : uint32_t  
{  
    None = 0x0,  
    Button1 = 0x1,  
    Button2 = 0x2,  
    Button3 = 0x4,  
    Button4 = 0x8,  
    Button5 = 0x10,  
    DPadLeft = 0x20,  
    DPadRight = 0x40,  
    DPadUp = 0x80,  
    DPadDown = 0x100,  
    DPadSelect = 0x200,  
}  
```

<a id="constantsSection" />

## 常量

| 常量         | 说明           |
| ---------- | ------------ |
| None       | 未按下任何按钮。     |
| Button1    | 已按下按钮 1。     |
| Button2    | 已按下按钮 2。     |
| Button3    | 已按下按钮 3。     |
| Button4    | 已按下按钮 4。     |
| Button5    | 已按下按钮 5。     |
| DPadLeft   | D-pad 向左按下。  |
| DPadRight  | D-pad 向右按下。  |
| DPadUp     | D-pad 向上按下。  |
| DPadDown   | D-pad 向下按下。  |
| DPadSelect | D-pad 中心已按下。 |

<a id="remarksSection" />

## 注解

XBOX One X 开发套件的正面板包括五个可编程按钮和一个像 5 向 D-pad 一样工作的方向按钮。

<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="XBOX One X 的正面板显示屏" width="704" height="362" data-path="images/gdk/reference/front_panel_display_small.png" />

此枚举在 [XFrontPanelGetButtonStates](/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetbuttonstates) 函数中使用。可以组合多个值以同时读取多个按钮。

有关详细信息，请参阅 [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" />

## 要求

**头文件：** xfrontpaneldisplay.h

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

<a id="seealsoSection" />

## 另请参阅

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


## Related topics

- [XFrontPanelGetButtonStates](/zh-CN/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetbuttonstates.md)
- [XFrontPanelDisplay](/zh-CN/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)
- [Front Panel URIs](/zh-CN/reference/deviceportal/frontpanel/atoc-rest-frontpanel.md)
- [XFrontPanelLight](/zh-CN/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md)
- [XFrontPanelIsSupported](/zh-CN/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelissupported.md)
