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

# XGameUiSetUiCallbacks

> XGameUiSetUiCallbacks

# XGameUiSetUiCallbacks

设置由开发人员定义的 UI 回调。

## 语法

```cpp theme={null}
STDAPI  XGameUiSetUiCallbacks(
    const XGameUiUiCallbacks* callbacks,
    bool useSystemUiIfAvailable
) noexcept;
```

### 参数

*callbacks*\
类型：const XGameUiUiCallbacks\*

指向包含开发人员希望处理的每个 UI 的处理程序和上下文的结构的指针。

*useSystemUiIfAvailable*\
类型：bool

如果可用，是否应使用系统 UI 而不是开发人员回调。

### 返回值

类型：STDAPI

## 备注

所有回调同时设置，并覆盖之前可能已设置的任何回调。

## 要求

**标头：** XGameUi.h

**支持的平台：** 仅在 Steam Deck 上受支持

## 另请参阅

[XGameUI](/reference/system/xgameui/xgameui_members)\
[XGameUiUiCallbacks](/reference/system/xgameui/structs/xgameuiuicallbacks)


## Related topics

- [XGameUiUiCallbacks](/zh-CN/reference/system/xgameui/structs/xgameuiuicallbacks.md)
- [XGameUiShowAchievementsUiCallback](/zh-CN/reference/system/xgameui/functions/xgameuishowachievementsuicallback.md)
- [XGameUiShowPlayerPickerUiCallback](/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickeruicallback.md)
- [XGameUiShowTextEntryUiCallback](/zh-CN/reference/system/xgameui/functions/xgameuishowtextentryuicallback.md)
- [XGameUiShowErrorDialogUiCallback](/zh-CN/reference/system/xgameui/functions/xgameuishowerrordialoguicallback.md)
