项目

一般

简介

道具筛选框组件 » 历史记录 » 版本 5

tejie, 2025-10-11 15:56

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