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

# XGameStreamingHideTouchControlsOnClient

> XGameStreamingHideTouchControlsOnClient

# XGameStreamingHideTouchControlsOnClient

请求指定的流式处理客户端设备隐藏触摸布局（如果它可见）。

## 语法

```cpp theme={null}
void XGameStreamingHideTouchControlsOnClient(  
         XGameStreamingClientId client  
)  
```

### 参数

*client*   \_In\_\
类型：XGameStreamingClientId

要在其上隐藏触摸控件的流式处理客户端设备。

### 返回值

类型：void

## 备注

此 API 请求指定的游戏流式处理客户端移除任何已显示的触摸叠加控件。如果玩家未在流式播放游戏，或者他们正在流式传输到未显示触摸叠加控件的设备，则此函数不执行任何操作。

若要显示指定的触摸控件布局，请调用 [XGameStreamingShowTouchControlLayoutOnClient](/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayoutonclient)。

每次调用 `XGameStreamingHideTouchControlsOnClient` 都会导致通过网络发送一条消息，因此不应每帧调用它。而是仅当游戏需要转换到不再在屏幕上显示触摸控件时才调用此 API。

如果游戏需要在**所有**已连接的流式处理客户端设备上隐藏触摸控件布局，请考虑改用 [XGameStreamingHideTouchControls](/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrols)。

## 示例

```C++ theme={null}
void OnShowMenu(XGameStreamingClientId client)
{
    // This game has native touch support for the menu system, so hide touch overlay controls
    XGameStreamingHideTouchControlsOnClient(client);
}

void OnDismissMenu(XGameStreamingClientId client)
{
    // Show the touch overlay controls which were previously on the screen before we hid them
    // due to bringing up the menu.
    XGameStreamingShowTouchControlsOnClient(client);
}
```

## 要求

**标头：** xgamestreaming.h

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XGameStreamingShowTouchControlLayoutOnClient](/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayoutonclient)\
[XGameStreamingHideTouchControls](/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrols)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members#TouchAdaptation)


## Related topics

- [XGameStreamingHideTouchControls](/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrols.md)
- [XGameStreamingShowTouchControlLayoutOnClient](/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayoutonclient.md)
- [XGameStreaming](/zh-CN/reference/system/xgamestreaming/xgamestreaming_members.md)
- [面向 GDK 的 Unity C# API 包装器](/zh-CN/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XGameStreamingShowTouchControlLayout](/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayout.md)
