道具筛选框组件 » 历史记录 » 版本 4
tejie, 2025-09-29 14:48
| 1 | 1 | yangdefeng | h4. %{color:firebrick}道具筛选框组件% |
|---|---|---|---|
| 2 | |||
| 3 | *模块说明* |
||
| 4 | 呼出一个道具筛选框,可自定义行列数 |
||
| 5 | 可定义哪些道具出现在筛选框中 |
||
| 6 | 点击组件中的按钮,返回选中道具名称列表,以“,”分隔 |
||
| 7 | |||
| 8 | *相关命令* |
||
| 9 | [[getcanInputItemList]] |
||
| 10 | [[setcanInputItem]] |
||
| 11 | [[getAllInputItem]] |
||
| 12 | |||
| 13 | *相关qfunction触发器* |
||
| 14 | %{color:orange}[@canInputItemList]% |
||
| 15 | 点击筛选框单元格时,单元处于可勾选状态时触发 |
||
| 16 | |||
| 17 | %{color:orange}[@canPutoffItemList]% |
||
| 18 | 点击筛选框单元格时,单元处于可取消勾选状态时触发 |
||
| 19 | |||
| 20 | - |
||
| 21 | - |
||
| 22 | |||
| 23 | 3 | tejie | h4. %{color:green}测试用例下载% |
| 24 | |||
| 25 | 4 | tejie | "测试用例":http://112.124.36.36/redmine/attachments/1206/道具筛选0.7z |
| 26 | 3 | tejie | |
| 27 | - |
||
| 28 | - |
||
| 29 | |||
| 30 | 1 | yangdefeng | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
| 31 | |||
| 32 | bq. [@main] |
||
| 33 | #act |
||
| 34 | [[mov]] n$打开筛选 1 |
||
| 35 | %{color:lightGrey};--配置置筛选框面板--% |
||
| 36 | %{color:lightGrey};panel:坐标x,坐标y:行,列:边长:选中图(对勾),未选中图(单元格底板):底板:间隔:面板宽,面板高:筛选列表x偏移,筛选列表y偏移% |
||
| 37 | [[mov]] s$panel panel:0,0:5,2:100:settings_mark,settings_markbg:ok_di:10:650,400:0,0 |
||
| 38 | |
||
| 39 | %{color:lightGrey};--配置置筛选框按钮--% |
||
| 40 | %{color:lightGrey};--button:坐标x,坐标y:图片:文字,颜色,字号% |
||
| 41 | [[mov]] s$button button:160,-130:anniu_hui_4zi:放入,250,30 |
||
| 42 | |
||
| 43 | %{color:lightGrey};--创建道具筛选框--% |
||
| 44 | 2 | tejie | %{color:lightGrey};getcanInputItemList 类型(0背包 1身上) 获取的最大数量 面板数据 按钮数据 筛选物品列表id,id,id, qf触发器% |
| 45 | 1 | yangdefeng | [[mov]] s$tmp 3,4,5,6,7,2001, |
| 46 | 2 | tejie | [[getcanInputItemList]] 0 10 <$str(s$panel)> <$str(s$button)> <$str(s$tmp)> *{color:green}放入* |
| 47 | 1 | yangdefeng | |
| 48 | - |
||
| 49 | - |
||
| 50 | |||
| 51 | bq. %{color:lightGrey};--..\Mir200\Envir\Market_Def\QFunction-0.txt--% |
||
| 52 | [<notextile>@</notextile>canInputItemList] |
||
| 53 | #act |
||
| 54 | [[setcanInputItem]] n0 1 |
||
| 55 | print 勾选了<$str(n0)> |
||
| 56 | 2 | tejie | |
| 57 | 1 | yangdefeng | [<notextile>@</notextile>canPutoffItemList] |
| 58 | #if |
||
| 59 | [[equal]] n$打开筛选 1 |
||
| 60 | #act |
||
| 61 | [[setcanInputItem]] n0 0 |
||
| 62 | print 取消了<$str(n0)> |
||
| 63 | |
||
| 64 | [<notextile>@</notextile>放入] |
||
| 65 | #act |
||
| 66 | [[mov]] n$打开筛选 0 |
||
| 67 | [[getAllInputItem]] s0 |
||
| 68 | [[messagebox]] 勾选道具列表:\\<$str(s0)> |