local rotate_view = GUI:RotateView_Create(npc.ui.bg, "rotate_view", 370, 265, 400, 400, 9999999, {
[1] = {scale = 0.6, img = "res/player_show/player_show_0/001400.png"},
[2] = {scale = 1.4, img = "res/player_show/player_show_0/004486.
🤖 回答引擎: 前端Lua |
🕒 时间: 2026-04-27 14:17:49 |
👁️ 阅读: 15
要获取旋转容器中的控件,可以使用以下函数:
1. **获取指定下标的item**:
```lua
-- 获取第2个item
local item = GUI:RotateView_getItemByIndex(rotate_view, 2)
```
2. **获取指定下标item添加的子节点**:
```lua
-- 获取第1个item的子节点
local child = GUI:RotateView_getChildByIndex(rotate_view, 1)
```
注意:`RotateView_getItemByIndex`返回的是容器中的item对象,而`RotateView_getChildByIndex`返回的是你添加到对应item上的子控件。
← 返回问答库