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

列舉前面板按鈕，包括方向按鈕 (方向鍵)。

<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 | 方向鍵按下左。 |
| DPadRight | 方向鍵按下右。 |
| DPadUp | 方向鍵按下上。 |
| DPadDown | 方向鍵按下下。 |
| DPadSelect | 已按下方向鍵中央。 |

<a id="remarksSection" />

## 備註

XBOX One X 開發套件的前面板包含五個可程式化按鈕，以及一個運作方式類似 5 向方向鍵的方向按鈕。

<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](/zh-TW/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetbuttonstates) 函式。您可以組合多個值來同時讀取多個按鈕。

如需詳細資訊，請參閱 [XBOX One X：使用前面板顯示器 (NDA 主題)](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](/zh-TW/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members)


## Related topics

- [XFrontPanelGetButtonStates](/zh-TW/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetbuttonstates.md)
- [XFrontPanelDisplay](/zh-TW/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)
- [XFrontPanelIsSupported](/zh-TW/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelissupported.md)
- [XFrontPanelLight](/zh-TW/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md)
- [XFrontPanelPresentBuffer](/zh-TW/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelpresentbuffer.md)
