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

# Layer 操作

> Layer Action (Experimental)

# Layer Action (Experimental)

按钮可用来显示层的操作。

> [!WARNING]
>
> 层目前以实验形式提供，可能会根据早期使用者的反馈更改其行为。

## 属性

`type` - *"layer"*。指定操作的类型。

`target` - *string*。执行操作时应显示的[`layer`](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/layout/game-streaming-touch-layer) 的名称。

## 备注

**层操作**用于允许玩家使层被显示。

如果[`button`](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-button) 是切换按钮，则 `layer` 将显示直到 `button` 再次被按下。

## 示例

#### 具有层操作以显示 selectAbility 层的切换按钮

```JSON theme={null}
{
    "type": "button",
    "action": {
        "type": "layer",
        "target": "selectAbility"
    },
    "styles": {
        "default": {
            "faceImage": {
                "type": "icon",
                "value": "add"
            }
        }
    },
    "toggle" : true
}
```

## 另请参阅

[Touch Adaptation Kit 参考](https://devdocs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)\
[Button](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-button)\
[Layer](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/layout/game-streaming-touch-layer)


## Related topics

- [Touch Adaptation Kit](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/touchadaptationkit-reference.md)
- [ClearUnorderedAccessViewFloat](https://devdocs.xbox.com/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_clearunorderedaccessviewfloat_public.md)
- [ClearUnorderedAccessViewUint](https://devdocs.xbox.com/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_clearunorderedaccessviewuint_public.md)
- [XSAPI C overview](https://devdocs.xbox.com/services/xbox-services/fundamentals/xbox-services-api/live-xsapi-flat-c.md)
- [Touch Adaptation Kit (TAK) リファレンス](https://devdocs.xbox.com/ja-jp/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)
