cocos_stack_horizontally
Arrange child nodes horizontally in Cocos Creator layouts with configurable spacing, padding, and vertical alignment options.
Instructions
cc.Layout type=HORIZONTAL — children arrange left-to-right.
align here is the cross-axis: top/center/bottom.
Returns the Layout component id.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scene_path": "<scene_path>",
"node_id": "<node_id>"
},
"name": "cocos_stack_horizontally"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| spacing | No | md | |
| padding | No | lg | |
| align | No | top |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |