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

# XFrontPanelButton

> XFrontPanelButton

# XFrontPanelButton

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

## 语法

```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,  
}  
```

## 常量

| 常量 | 说明 |
| - | - |
| 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 中心已按下。 |

## 注解

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

![XBOX One X 的正面板显示屏](https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/front_panel_display_small.png?fit=max\&auto=format\&n=-_0FrcE2bDxzGxv-\&q=85\&s=8c81bf256714cec6526e83a4cbac5538)

此枚举在 [XFrontPanelGetButtonStates](https://docs.xbox.com/zh-CN/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetbuttonstates.md) 函数中使用。可以组合多个值以同时读取多个按钮。

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

## 要求

**头文件：** xfrontpaneldisplay.h

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

## 另请参阅

[XFrontPanelDisplay](https://docs.xbox.com/zh-CN/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)


## Related topics

- [XFrontPanelGetButtonStates](https://docs.xbox.com/zh-CN/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetbuttonstates.md)
- [XFrontPanelDisplay（API 内容）](https://docs.xbox.com/zh-CN/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)
- [XFrontPanelIsSupported](https://docs.xbox.com/zh-CN/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelissupported.md)
- [XFrontPanelLight](https://docs.xbox.com/zh-CN/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md)
- [Front Panel URI（API 内容）](https://docs.xbox.com/zh-CN/reference/deviceportal/frontpanel/atoc-rest-frontpanel.md)
