Dlg input » 历史记录 » 版本 8
tejie, 2025-09-23 17:46
1 | 3 | yangdefeng | h4. _*%{color:green}<input:%*_ |
---|---|---|---|
2 | 1 | machenhe | |
3 | 8 | tejie | 标签:命令定义^<input: |
4 | 1 | machenhe | |
5 | *定义* |
||
6 | 自定义对话框中设置一个文字输入框 |
||
7 | 2 | yangdefeng | 参数之间以":"为分割符 |
8 | 1 | machenhe | |
9 | *使用前提* |
||
10 | 配置Tejieconfig.txt |
||
11 | 开启对应开关 |
||
12 | ** 文件位置 |
||
13 | 2 | yangdefeng | ..\Mir200\Tejieconfig\Tejieconfig.txt |
14 | 1 | machenhe | ** 对应开关 |
15 | [tjconfig] |
||
16 | 2 | yangdefeng | %{color:lightGrey};(=1时开启,=0时关闭,缺省时关闭)% |
17 | 1 | machenhe | isUseCustomOKPanel=1 |
18 | |||
19 | - |
||
20 | - |
||
21 | |||
22 | *格式* |
||
23 | |命令名 |参数1 |参数2 |参数3 |参数4 |参数5 |参数6 |参数7 |参数8 |参数9 |参数10 |参数11 | |
||
24 | |input |编号 |类型 |提醒文本 |提醒文本字色 |宽度 |高度 |输入文本字色 |字号 |字数限制 |X坐标 |Y坐标 | |
||
25 | |||
26 | *说明* |
||
27 | 8 | tejie | |参数1|输入框ID 存在多个输入框时,用于作出区别| |
28 | |参数2|输入类型 0任意文本 1数字 2密码| |
||
29 | |参数3|输入框空着时提醒文本| |
||
30 | |参数4|空着时提醒文本颜色| |
||
31 | |参数5|输入框宽度| |
||
32 | |参数6|输入框高度| |
||
33 | |参数7|输入文本颜色| |
||
34 | |参数8|文本字号| |
||
35 | |参数9|字数限制(默认0不限制)| |
||
36 | |参数10|x坐标| |
||
37 | |参数11|y坐标| |
||
38 | 1 | machenhe | |
39 | 8 | tejie | 固定[@submitInput]为提交触发器 |
40 | 固定[@endInputX]为结束输入触发器,sX为编辑结束时输入值,X代表输入框id |
||
41 | 上述触发器触发时, |
||
42 | 1 | machenhe | 输入框中的内容将保存在对应序号的s变量 |
43 | |||
44 | |||
45 | - |
||
46 | - |
||
47 | |||
48 | 4 | yangdefeng | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
49 | 1 | machenhe | |
50 | bq. [<notextile>@</notextile>main] |
||
51 | #act |
||
52 | %{color:lightGrey};输入框显示值赋初值% |
||
53 | 6 | yangdefeng | [[mov]] s$显示值 1000 |
54 | 1 | machenhe | goto <notextile>@</notextile>界面显示 |
55 | |
||
56 | [<notextile>@</notextile>界面显示] |
||
57 | #say |
||
58 | 6 | yangdefeng | <[[dlg_img_|img]]:huatiao01:70:40:1:1> |
59 | 7 | yangdefeng | <notextile><</notextile>*{color:green}input*:1:0:<$str(s$显示值)>:241:220:40:28:30:0:80:50/<notextile>@</notextile>endInput1> |
60 | 6 | yangdefeng | <[[dlg_text_|text]]:加一:0:50/<notextile>@</notextile>加1按钮> |
61 | 1 | machenhe | <text:减一:310:50/<notextile>@</notextile>减1按钮> |
62 | |
||
63 | <text:提交:150:500/<notextile>@</notextile>submitInput> |
||
64 | |
||
65 | [<notextile>@</notextile>endInput1] |
||
66 | %{color:lightGrey};触发编辑结束,如未写内容,会返回一个空字符% |
||
67 | #if |
||
68 | 6 | yangdefeng | [[not]] [[equal]] [[基础变量|s1]] |
69 | 1 | machenhe | #act |
70 | 6 | yangdefeng | mov s$显示值 [[<$str()>|<$str(s1)>]] |
71 | [[sendMsg]] 6 编辑后显示值<$str(s$显示值)> |
||
72 | 1 | machenhe | |
73 | [<notextile>@</notextile>submitInput] |
||
74 | %{color:lightGrey};触发提交时,如input未编辑过,会返回一个空格% |
||
75 | #if |
||
76 | 3 | yangdefeng | equal " " <$str(s1)> |
77 | 1 | machenhe | #act |
78 | sendMsg 6 输入的是<$str(s$显示值)> |
||
79 | #elseAct |
||
80 | sendMsg 6 输入的是<$str(s1)> |
||
81 | |
||
82 | [<notextile>@</notextile>加1按钮] |
||
83 | #if |
||
84 | #act |
||
85 | mov n$显示值数字化 <$str(s$显示值)> |
||
86 | inc n$显示值数字化 1 |
||
87 | mov s$显示值 <$str(n$显示值数字化)> |
||
88 | goto <notextile>@</notextile>界面显示 |
||
89 | |
||
90 | [<notextile>@</notextile>减1按钮] |
||
91 | #if |
||
92 | #act |
||
93 | mov n$显示值数字化 <$str(s$显示值)> |
||
94 | 6 | yangdefeng | [[inc]] n$显示值数字化 -1 |
95 | 1 | machenhe | mov s$显示值 <$str(n$显示值数字化)> |
96 | goto <notextile>@</notextile>界面显示 |