Dlg circleList » 历史记录 » 版本 9
tejie, 2025-09-23 18:14
| 1 | 5 | tejie | h4. _*%{color:green}<circleList:%*_ |
|---|---|---|---|
| 2 | 4 | tejie | |
| 3 | 1 | yangdefeng | 设置对话框中循环列表样式。 |
| 4 | 可适用对话框中100行以上的列表显示 |
||
| 5 | |||
| 6 | *{color:red}客户端版本需求: 2.2.2* |
||
| 7 | |||
| 8 | 9 | tejie | 标签:命令定义^<circleList: |
| 9 | 1 | yangdefeng | |
| 10 | *格式* |
||
| 11 | 3 | tejie | |命令名 |参数1 |参数2 |参数3 |参数4 |参数5 | |
| 12 | |circleList|循环列表内容|循环列表名称,预留参数写1,预留参数写1,预留参数写1|X坐标,Y坐标|滑动方向,行列数,总高(宽)度,是否可滑动,屏幕锚点,滑块图片|单元间隔| |
||
| 13 | 1 | yangdefeng | |
| 14 | 3 | tejie | - |
| 15 | - |
||
| 16 | |||
| 17 | h4. *说明* |
||
| 18 | |||
| 19 | 1 | yangdefeng | * 参数1: 循环列表内容,是由 循环列表模板 + 循环列表内容 构成的字符串。 |
| 20 | ** [[dlg_itemModel_|循环列表模板]] |
||
| 21 | ** 循环列表单元 |
||
| 22 | 每个单元包含在“()”当中 |
||
| 23 | 每个单元均以 [[dlg_itemIndex_|<itemIndex:]] 开始 |
||
| 24 | 每个单元包含一组对话框命令,命令顺序与[[dlg_itemModel_|循环列表模板]]中设定一致 |
||
| 25 | |||
| 26 | * 参数2: 循环列表名称,预留参数写1,预留参数写1,预留参数写1 |
||
| 27 | ** 循环列表名称 |
||
| 28 | 区别对话框中存在的多个同类列表 |
||
| 29 | *** 脚本方式给循环列表赋值 |
||
| 30 | 循环列表名称无特殊要求 |
||
| 31 | *** 读表方式给循环列表赋值 |
||
| 32 | 循环列表名称需要与赋值表同名 |
||
| 33 | ** 预留参数写1 |
||
| 34 | ** 预留参数写1 |
||
| 35 | ** 预留参数写1 |
||
| 36 | |||
| 37 | * 参数3: 循环列表在对话框中的X坐标,Y坐标 |
||
| 38 | |||
| 39 | 5 | tejie | * 参数4: 滑动方向,行列数,总高(宽)度,是否可滑动,屏幕锚点,滑块图片 |
| 40 | 1 | yangdefeng | ** 滑动方向 (1 纵向滑动,0 横向滑动) |
| 41 | ** 行列数 (纵向滑动时为列数,横向滑动时为行数) |
||
| 42 | ** 总高(宽)度 (纵向滑动时为总高度,横向滑动时为总宽度) |
||
| 43 | ** 是否可滑动 (1 可滑动,0 不可滑动) |
||
| 44 | 5 | tejie | ** 屏幕锚点 |
| 45 | 锚点id 1-9(屏幕9个区域:左上,中上,右上,左中,正中,右中,左下,中下,右下) |
||
| 46 | 非缺省时,配合 [[openBigDialogBox]] 命令全屏窗口使用。 |
||
| 47 | 可缺省,缺省为当前对话框窗口左上。 |
||
| 48 | ** 滑块图片:列表可滑动时显示的滑块图片,纵向滑动时位于列表右侧,横向滑动时位于列表下方。 |
||
| 49 | 纵向滑动时,图片宽度固定,纵向自动拉伸,可在打包工具中配置九宫信息。 |
||
| 50 | 横向滑动时,图片高度固定,横向自动拉伸,可在打包工具中配置九宫信息。 |
||
| 51 | 可缺省,缺省时不显示。 |
||
| 52 | 1 | yangdefeng | |
| 53 | * 参数5: 单元间隔 |
||
| 54 | |||
| 55 | |||
| 56 | - |
||
| 57 | - |
||
| 58 | |||
| 59 | h4. %{color:deepskyblue}特戒引擎脚本示例:% |
||
| 60 | |||
| 61 | *使用前提1* |
||
| 62 | 请开启配置开关"isUseCustomOKPanel" |
||
| 63 | |配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt | |
||
| 64 | |配置节点|[[tjconfig|[tjconfig]]] | |
||
| 65 | |配置项 |isUseCustomOkPanel=1 | |
||
| 66 | |||
| 67 | - |
||
| 68 | - |
||
| 69 | |||
| 70 | h4. %{color:fireBrick}原型示例1% |
||
| 71 | |||
| 72 | bq. [<notextile>@</notextile>ini] |
||
| 73 | #act |
||
| 74 | mov s$modelList (<[[dlg_itemModel_|itemModel]]:3,7,1,7,1,1:-1,-1:450,250>) |
||
| 75 | |
||
| 76 | inc s$modelList (<[[dlg_itemIndex_|itemIndex]]:1> |
||
| 77 | inc s$modelList <[[dlg_img_|img]]:denglu_liebiao_weixuanzhong:0:0:1:2.5:450:250> |
||
| 78 | inc s$modelList <[[dlg_itemShow_|itemShow]]:11:7:320:12:1:0> |
||
| 79 | inc s$modelList <[[dlg_text_|text]]:诛魔星光剑1{scolor=150}:120:20> |
||
| 80 | inc s$modelList <itemShow:12:0:12:12:1:0> |
||
| 81 | inc s$modelList <text:1:0:0> |
||
| 82 | inc s$modelList <text:尚未获得:150:70>) |
||
| 83 | |
||
| 84 | inc s$modelList (<itemIndex:2> |
||
| 85 | inc s$modelList <img:denglu_liebiao_weixuanzhong:0:0:1:2.5:450:250> |
||
| 86 | inc s$modelList <itemShow:11:7:320:12:1:0> |
||
| 87 | inc s$modelList <text:诛魔星光剑2{scolor=150}:120:20> |
||
| 88 | inc s$modelList <itemShow:12:0:12:12:1:0> |
||
| 89 | inc s$modelList <text:2:0:0> |
||
| 90 | inc s$modelList <text:尚未获得:150:70>) |
||
| 91 | |
||
| 92 | [<notextile>@</notextile>main] |
||
| 93 | #act |
||
| 94 | goto <notextile>@</notextile>ini |
||
| 95 | [[openMerchantBigDlg]] ok_di 4 0 0 1 0 0 |
||
| 96 | #say |
||
| 97 | 2 | tejie | <[[dlg_panelSize_|panelSize2]]:1200:600>\ |
| 98 | 1 | yangdefeng | %{color:lightGrey};--circlelist |
| 99 | ; :列表内容 |
||
| 100 | ; :列表名称,预留参数写1,预留参数写1,预留参数写1 |
||
| 101 | ; :X坐标,Y坐标 |
||
| 102 | ; :滑动方向,行列数,总高(宽)度,是否可滑动 |
||
| 103 | ; :单元间隔% |
||
| 104 | <notextile><</notextile>*{color:green}circleList*:<$str(s$modelList)>:循环列表,1,1,1:25,25:1,2,540,1:0>\ |
||
| 105 | |||
| 106 | - |
||
| 107 | - |
||
| 108 | |||
| 109 | h4. %{color:fireBrick}原型示例2% |
||
| 110 | |||
| 111 | bq. [<notextile>@</notextile>ini] |
||
| 112 | #act |
||
| 113 | [[mov]] s$modelList (<[[dlg_itemModel_|itemModel]]:3,1|3,7,1,7,1,3|1:-1,-1:450,250>) |
||
| 114 | |
||
| 115 | inc s$modelList (<[[dlg_itemIndex_|itemIndex]]:1,3,1> |
||
| 116 | inc s$modelList <[[dlg_img_|img]]:denglu_liebiao_weixuanzhong:0:0:1:2.5:450:250> |
||
| 117 | inc s$modelList <img:lc_yiwancheng:20:140:1:1> |
||
| 118 | inc s$modelList <[[dlg_itemShow_|itemShow]]:11:7:320:12:1:0> |
||
| 119 | inc s$modelList <[[dlg_text_|text]]:诛魔星光剑1{scolor=150}:120:20> |
||
| 120 | inc s$modelList <itemShow:12:0:12:12:1:0> |
||
| 121 | inc s$modelList <text:1:0:0> |
||
| 122 | inc s$modelList <text:尚未获得:150:75> |
||
| 123 | inc s$modelList ) |
||
| 124 | |
||
| 125 | inc s$modelList (<itemIndex:2,1,3> |
||
| 126 | inc s$modelList <img:denglu_liebiao_weixuanzhong:0:0:1:2.5:450:250> |
||
| 127 | inc s$modelList <text:尚未完成:20:150> |
||
| 128 | inc s$modelList <itemShow:11:7:320:12:1:0> |
||
| 129 | inc s$modelList <text:诛魔星光剑2{scolor=150}:120:20> |
||
| 130 | inc s$modelList <itemShow:12:0:12:12:1:0> |
||
| 131 | inc s$modelList <text:2:0:0> |
||
| 132 | inc s$modelList <img:lc_yilingqu:150:55:1:1> |
||
| 133 | inc s$modelList ) |
||
| 134 | |
||
| 135 | [<notextile>@</notextile>main] |
||
| 136 | #act |
||
| 137 | goto <notextile>@</notextile>ini |
||
| 138 | [[openMerchantBigDlg]] ok_di 4 0 0 1 0 0 |
||
| 139 | #say |
||
| 140 | 2 | tejie | <[[dlg_panelSize_|panelSize2]]:1200:600>\ |
| 141 | 1 | yangdefeng | %{color:lightGrey};--circlelist |
| 142 | ; :列表内容 |
||
| 143 | ; :列表名称,当前选中序号,是否可不选,可不选时是否亮 |
||
| 144 | ; :X坐标,Y坐标 |
||
| 145 | ; :滑动方向,行列数,总高(宽)度,是否可滑动 |
||
| 146 | ; :单元间隔% |
||
| 147 | <notextile><</notextile>*{color:green}circleList*:<$str(s$modelList)>:循环列表,1,1,1:25,25:1,2,540,1:10>\ |
||
| 148 | |||
| 149 | - |
||
| 150 | - |
||
| 151 | |||
| 152 | 7 | tejie | h4. %{color:fireBrick}原型示例--读表模式% |
| 153 | 1 | yangdefeng | |
| 154 | *使用前提* |
||
| 155 | 将附件中的配置文件放入以下目录 |
||
| 156 | ..\Mir200\Envir\QuestDiary\数据文件\ |
||
| 157 | |||
| 158 | |||
| 159 | |||
| 160 | bq. [<notextile>@</notextile>ini] |
||
| 161 | #act |
||
| 162 | %{color:lightGrey};--itemModel |
||
| 163 | ; :组件类型,组件类型|组件类型|组件类型,组件类型 |
||
| 164 | ; :选中图片,未选中图片 |
||
| 165 | ; :单条宽度,单条高度% |
||
| 166 | [[mov]] s$item0 (<[[dlg_itemModel_|itemModel]]:3,7,1,7,1,1:-1,-1:450,250>) |
||
| 167 | mov s$modelList <$str(s$item0)> |
||
| 168 | |
||
| 169 | [[tbl_load]] g循环列表 \数据文件\循环列表.csv |
||
| 170 | [[tbl_create_player]] 循环列表 key col1 |
||
| 171 | [[tbl_copy]] g循环列表 循环列表 |
||
| 172 | |
||
| 173 | [<notextile>@</notextile>main] |
||
| 174 | #act |
||
| 175 | goto <notextile>@</notextile>ini |
||
| 176 | [[openMerchantBigDlg]] ok_di 4 0 0 1 0 0 |
||
| 177 | #say |
||
| 178 | 2 | tejie | <[[dlg_panelSize_|panelSize2]]:1400:700>\ |
| 179 | 1 | yangdefeng | %{color:lightGrey};--circlelist |
| 180 | ; :列表内容 |
||
| 181 | ; :列表名称,当前选中序号,是否可不选,可不选时是否亮 |
||
| 182 | ; :X坐标,Y坐标 |
||
| 183 | ; :滑动方向,行列数,总高(宽)度,是否可滑动 |
||
| 184 | ; :单元间隔% |
||
| 185 | <notextile><</notextile>*{color:green}circleList*:<$str(s$modelList)>:循环列表,1,1,1:25,25:1,3,650,1:0>\ |
||
| 186 | 6 | tejie | |
| 187 | - |
||
| 188 | - |
||
| 189 | |||
| 190 | h4. %{color:fireBrick}返回当前点击itemId的示例% |
||
| 191 | |||
| 192 | %{color:red}请注意以下示例中,p变量的开关用法% |
||
| 193 | |||
| 194 | bq. <notextile>[@示例]</notextile> |
||
| 195 | #act |
||
| 196 | [[mov]] s$itemList (<itemModel:1:-1,-1:450,60>) |
||
| 197 | [[inc]] s$itemList (<itemIndex:1> |
||
| 198 | [[inc]] s$itemList <text:循环条目1:120:20> |
||
| 199 | 8 | tejie | [[inc]] s$itemList ) |
| 200 | 6 | tejie | [[inc]] s$itemList (<itemIndex:2> |
| 201 | [[inc]] s$itemList <text:循环条目2:120:20/<notextile>@</notextile>文本链接> |
||
| 202 | 8 | tejie | [[inc]] s$itemList ) |
| 203 | 6 | tejie | #say |
| 204 | <circleList:<$str(s$modelList)>:<notextile></notextile>*{color:green}循环列表id*<notextile></notextile>,1,1,1:25,25:1,3,650,1:0<notextile></notextile>%{color:green}/@循环列表id%<notextile></notextile>>\ |
||
| 205 | <notextile></notextile> |
||
| 206 | [<notextile></notextile>*{color:green}<notextile>@</notextile>循环列表id*<notextile></notextile>] |
||
| 207 | #if |
||
| 208 | [[equal]] <$str(p0)> 1 |
||
| 209 | #act |
||
| 210 | [[print]] 当前点击的item--><$str(s0)>-->值返回给“文本链接内容” |
||
| 211 | [[goto]] <notextile>@文本链接内容</notextile> |
||
| 212 | [[break]] |
||
| 213 | 1 | yangdefeng | <notextile></notextile> |
| 214 | 6 | tejie | #if |
| 215 | 8 | tejie | #act |
| 216 | 6 | tejie | [[print]] 当前点击的item--><$str(s0)>,处理“循环列表item整体”点击触发业务 |
| 217 | <notextile></notextile> |
||
| 218 | <notextile>[@文本链接]</notextile> |
||
| 219 | %{color:lightGrey};--此处不可以直接获得 itemId 的返回值,需要通过 循环列表 触发器获取% |
||
| 220 | #act |
||
| 221 | [[mov]] p0 1 |
||
| 222 | <notextile></notextile> |
||
| 223 | <notextile>[@文本链接内容]</notextile> |
||
| 224 | #if |
||
| 225 | #act |
||
| 226 | [[print]] 当前收到itemId:<$str(s0)>,处理“循环列表item内部文本”点击触发业务 |
||
| 227 | [[mov]] p0 0 |