项目

一般

简介

Dlg input » 历史记录 » 版本 7

yangdefeng, 2022-05-30 06:36

1 3 yangdefeng
h4. _*%{color:green}<input:%*_
2 1 machenhe
3 2 yangdefeng
标签:命令定义|dlg_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
* 参数1 : 输入框ID 存在多个输入框时,用于作出区别
28
29
* 参数2 : 输入类型 0任意文本 1数字 2密码
30
31
* 参数3 : 输入框空着时提醒文本
32
33
* 参数4 : 空着时提醒文本颜色
34
35
* 参数5 : 输入框宽度
36
37
* 参数6 : 输入框高度
38
39
* 参数7 : 输入文本颜色
40
41
* 参数8 : 文本字号
42
43
* 参数9 : 字数限制(默认0不限制)
44
45
* 参数10 : x坐标
46
47
* 参数11 : y坐标
48
49
* 固定[@submitInput]为提交触发器
50
51 5 yangdefeng
* 固定[@endInputX]为结束输入触发器,sX为编辑结束时输入值,X代表输入框id
52 1 machenhe
53
* 上述触发器触发时,
54
输入框中的内容将保存在对应序号的s变量
55
56
57
-
58
-
59
60 4 yangdefeng
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
61 1 machenhe
62
bq. [<notextile>@</notextile>main]
63
#act
64
%{color:lightGrey};输入框显示值赋初值%
65 6 yangdefeng
[[mov]] s$显示值 1000
66 1 machenhe
goto <notextile>@</notextile>界面显示
67
&nbsp;
68
[<notextile>@</notextile>界面显示]
69
#say
70 6 yangdefeng
<[[dlg_img_|img]]:huatiao01:70:40:1:1>
71 7 yangdefeng
<notextile><</notextile>*{color:green}input*:1:0:<$str(s$显示值)>:241:220:40:28:30:0:80:50/<notextile>@</notextile>endInput1>
72 6 yangdefeng
<[[dlg_text_|text]]:加一:0:50/<notextile>@</notextile>加1按钮>
73 1 machenhe
<text:减一:310:50/<notextile>@</notextile>减1按钮>
74
&nbsp;
75
<text:提交:150:500/<notextile>@</notextile>submitInput>
76
&nbsp;
77
[<notextile>@</notextile>endInput1]
78
%{color:lightGrey};触发编辑结束,如未写内容,会返回一个空字符%
79
#if
80 6 yangdefeng
[[not]] [[equal]] [[基础变量|s1]]
81 1 machenhe
#act
82 6 yangdefeng
mov s$显示值 [[<$str()>|<$str(s1)>]]
83
[[sendMsg]] 6 编辑后显示值<$str(s$显示值)>
84 1 machenhe
&nbsp;
85
[<notextile>@</notextile>submitInput]
86
%{color:lightGrey};触发提交时,如input未编辑过,会返回一个空格%
87
#if
88 3 yangdefeng
equal " " <$str(s1)>
89 1 machenhe
#act
90
sendMsg 6 输入的是<$str(s$显示值)>
91
#elseAct
92
sendMsg 6 输入的是<$str(s1)>
93
&nbsp;
94
[<notextile>@</notextile>加1按钮]
95
#if
96
#act
97
mov n$显示值数字化 <$str(s$显示值)>
98
inc n$显示值数字化 1
99
mov s$显示值 <$str(n$显示值数字化)>
100
goto <notextile>@</notextile>界面显示
101
&nbsp;
102
[<notextile>@</notextile>减1按钮]
103
#if
104
#act
105
mov n$显示值数字化 <$str(s$显示值)>
106 6 yangdefeng
[[inc]] n$显示值数字化 -1
107 1 machenhe
mov s$显示值 <$str(n$显示值数字化)>
108
goto <notextile>@</notextile>界面显示