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

# GameInputSwitchPosition

> GameInputSwitchPosition

# GameInputSwitchPosition

列舉輸入裝置上切換開關的位置。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
enum GameInputSwitchPosition
{
    GameInputSwitchCenter    = 0,
    GameInputSwitchUp        = 1,
    GameInputSwitchUpRight   = 2,
    GameInputSwitchRight     = 3,
    GameInputSwitchDownRight = 4,
    GameInputSwitchDown      = 5,
    GameInputSwitchDownLeft  = 6,
    GameInputSwitchLeft      = 7,
    GameInputSwitchUpLeft    = 8
};
```

<a id="constantsSection" />

## 常數

| 常數 | 描述 |
| - | - |
| GameInputSwitchCenter | 切換開關位於中央位置。 |
| GameInputSwitchUp | 切換開關位於上方位置。 |
| GameInputSwitchUpRight | 切換開關位於右上方位置。 |
| GameInputSwitchRight | 切換開關位於右方位置。 |
| GameInputSwitchDownRight | 切換開關位於右下方位置。 |
| GameInputSwitchDown | 切換開關位於下方位置。 |
| GameInputSwitchDownLeft | 切換開關位於左下方位置。 |
| GameInputSwitchLeft | 切換開關位於左方位置。 |
| GameInputSwitchUpLeft | 切換開關位於左上方位置。 |

<a id="remarksSection" />

## 備註

並非每個切換開關都支援所有值。

此列舉用於 [GameInputFlightStickState](/zh-TW/reference/input/gameinput/structs/gameinputflightstickstate) 結構和 [IGameInputReading::GetControllerSwitchState](/zh-TW/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchstate) 方法。

如需 GameInput API 的中階和進階使用案例，請參閱 [進階 GameInput](/zh-TW/build/core-features/common/input/advanced/input-advanced-topics) 主題。

<a id="requirementsSection" />

## 需求

**標頭：** GameInput.h

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[GameInput 概觀](/zh-TW/build/core-features/common/input/overviews/input-overview)\
[GameInput](/zh-TW/reference/input/gameinput/gameinput_members)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v0** | 已推出。 |


## Related topics

- [GameInputFlightStickState](/zh-TW/reference/input/gameinput/structs/gameinputflightstickstate.md)
- [IGameInputReading::GetControllerAxisState](/zh-TW/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxisstate.md)
- [GameInputButtonMapping](/zh-TW/reference/input/gameinput/structs/gameinputbuttonmapping.md)
- [GameInput](/zh-TW/reference/input/gameinput/gameinput_members.md)
- [GameInputAxisMapping](/zh-TW/reference/input/gameinput/structs/gameinputaxismapping.md)
