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

# GameInputSwitchPosition

> GameInputSwitchPosition

# GameInputSwitchPosition

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

## 語法

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

## 常數

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

## 備註

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

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

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

## 需求

**標頭：** GameInput.h

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

## 另請參閱

[GameInput 概觀](https://docs.xbox.com/zh-TW/build/core-features/common/input/overviews/input-overview.md)\
[GameInput](https://docs.xbox.com/zh-TW/reference/input/gameinput/gameinput_members.md)

## 版本歷程記錄

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


## Related topics

- [GameInputFlightStickState](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputflightstickstate.md)
- [GameInputButtonMapping](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputbuttonmapping.md)
- [GetControllerAxisState](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxisstate.md)
- [GameInput API 成員](https://docs.xbox.com/zh-TW/reference/input/gameinput/gameinput_members.md)
- [GameInputAxisMapping](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputaxismapping.md)
