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

# GameInputControllerButtonInfo

> GameInputControllerButtonInfo

# GameInputControllerButtonInfo

<Warning>**已弃用。** 此结构已在 GameInput v3 中移除，当前 API 中不再提供。此信息现在通过 [GameInputControllerInfo](/reference/input/gameinput/structs/gameinputcontrollerinfo) 提供。</Warning>

描述通用控制器设备上的一个按钮。

## 语法

```cpp theme={null}
typedef struct GameInputControllerButtonInfo {
    GameInputLabel label;
    GameInputLocation location;
    uint32_t locationId;
} GameInputControllerButtonInfo;
```

## 成员

**label**\
类型：[GameInputLabel](/reference/input/gameinput/enums/gameinputlabel)

标识按钮功能的标签。

**location**\
类型：[GameInputLocation](/reference/input/gameinput/deprecated/enums/gameinputlocation)

按钮在设备上的物理位置。

**locationId**\
类型：uint32\_t

用于区分同一位置上不同按钮的标识符。

## 版本历史

| 版本     | 变更                                                                                                  |
| ------ | --------------------------------------------------------------------------------------------------- |
| **v3** | 已移除。字段已集成到 [GameInputControllerInfo](/reference/input/gameinput/structs/gameinputcontrollerinfo) 中。 |
| **v2** | 无变更。                                                                                                |
| **v1** | 无变更。                                                                                                |
| **v0** | 已引入。                                                                                                |

## 另请参阅

[已弃用的 GameInput API 成员](/reference/input/gameinput/deprecated/gameinput_deprecated_members)
[GameInputControllerInfo](/reference/input/gameinput/structs/gameinputcontrollerinfo)


## Related topics

- [GameInputLocation](/zh-CN/reference/input/gameinput/deprecated/enums/gameinputlocation.md)
- [GameInput](/zh-CN/reference/input/gameinput/gameinput_members.md)
- [已弃用的 GameInput API 成员](/zh-CN/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
- [IGameInputReading::GetControllerButtonCount](/zh-CN/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerbuttoncount.md)
- [IGameInputReading::GetControllerButtonState](/zh-CN/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerbuttonstate.md)
