手游端列表容器说明

原文件:手游端列表容器说明.docx 更新时间:2026-04-07 12:03:26 大小:19.5 KB 图片:0 作者:Administrator

手游端列表容器说明

手游端列表容器说明

<ListView|children={2,3,4}|direction=xx|bounce=xx|margin=xx|img=xx/xxx.png|color=0>

参数说明:

参数

释义

ListView

参数头,首字母必须大写,代表本类为列表容器

x

文本偏移X

y

文本偏移Y

children

容器内子控件的ID号

direction

容器内空间滑动方向 1竖向 2横向

bounce

滑动到底之后是否有个弹性效果 就是弹回 1是 0否

margin

子控件之间的坐标间隔

reload

刷新面板=1 不刷新=0

default

索引跳转第几个容器(难以描述,自己测试)

img

增加滑动指示素材

color

列表容器背景色,需要透明请删除color参数

colcount

每行组件的数量

colmargin

每行的间隔

colwidth

每个子组件的宽度

colheight

每行的高度

linktop

到顶后再上拉触发

linkbottom

到底后再上拉触发

defaultex

列表滚动。格式:像素,毫秒

pos

1=关闭界面后依然会记录当前列表滚动位置

_localZOrder

组件层级,数值越大的越后渲染,越小的越先渲染

以下为PC新UI新增参数

手游忽略以下说明

verticalscroll

1=显示垂直滚动条,0=隐藏垂直滚动条(默认)

horizontalscroll

1=显示水平滚动条,0=隐藏水平滚动条(默认)

注:除了开头参数首字母必须大写,所有参数必须小写,参数内容支持变量,用{ } 插入,比如 size={$STR(P0)}

  •  

同一脚本ID不可以重复,背景默认ID为1,自己定义ID从2开始

  •  
  •  

如果容器脚本非常大,导致单页面加载脚本卡,需要用loadDelay延迟加载功能就不卡

  •  
  •  

需要调用的时候,自需要在节点树或者参数内写好哪些控件为列表容器的子控件,加载出来就会完整显示列表容器

  •  
  •  

linktop/linkbutton标签触发事件,到底后再下拉触发linkbutton=@labal,到顶后再上拉触发linktop=@labal

  •  

新增 ListView的defaultex参数 (1000704-002客户端, 24.11.01.01.001引擎)

用于脚本控制list自动滚动 defaultex=滚动位置(像素),时间(毫秒)
例:

[@ListView测试]
<Button|x=539|y=0|nimg=public/button/btn_close_01.png|_localZOrder=0|pimg=public/button/btn_close_01.png|link=@exit>
<Layout|x=545|y=0|width=80|height=80|_localZOrder=-1|link=@exit>
<Img|show=0|move=0|loadDelay=0|img=public/bg_npc_01.png|reset=1|_localZOrder=-2|bg=1>
<ListView|width=200|height=200|color=255|children=1,2,3,4,5,6,7,8,9,10,11,12,13,14|defaultex=200,500>
<Layout|id=1|width=200|height=80|color=255>
<Layout|id=2|width=200|height=80|color=254>
<Layout|id=3|width=200|height=80|color=253>
<Layout|id=4|width=200|height=80|color=252>
<Layout|id=5|width=200|height=80|color=251>
<Layout|id=6|width=200|height=80|color=250>
<Layout|id=7|width=200|height=80|color=249>
<Layout|id=8|width=200|height=80|color=248>
<Layout|id=9|width=200|height=80|color=247>
<Layout|id=10|width=200|height=80|color=246>
<Layout|id=11|width=200|height=80|color=245>
<Layout|id=12|width=200|height=80|color=244>
<Layout|id=13|width=200|height=80|color=243>
<Layout|id=14|width=200|height=80|color=242>

新增 ListView的pos参数 (1000704-002客户端, 24.11.01.01.001引擎)

pos=1时,关闭界面后依然会记录当前列表滚动位置
<ListView|width=200|height=200|color=255|children=1,2,3,4,5,6,7,8,9,10,11,12,13,14|pos=1>


本页面由服务器脚本从原始 DOCX 自动生成。排版如与 Word 略有差异,请以原始 DOCX 为准。