项目

一般

简介

AddMainCenterBtn » 历史记录 » 版本 4

tejie, 2023-11-30 14:15

1 2 yangdefeng
h4. _*%{color:green}addMainCenterBtn%*_
2 1 machenhe
3
屏幕中间位置添加自定义按钮
4
5 3 tejie
标签:命令定义|addMainCenterBtn>addMainCenterBtn
6 1 machenhe
7
*格式*
8 2 yangdefeng
|命令名			|参数1		|参数2		|参数3		|参数4		|参数5		|参数6		|参数7		|参数8		|参数9			|参数10			|参数11		|
9 3 tejie
|addMainCenterBtn	|按钮名称	|按钮类型	|按钮图片	|按钮坐标及锚点	|按钮文字	|文字颜色	|字号		|文字坐标	|文字背景图片名称	|导航坐标及光圈设置	|跳转方法	|
10 1 machenhe
11
说明:
12 2 yangdefeng
* 参数1: 按钮名称
13 1 machenhe
14 2 yangdefeng
* 参数2: 按钮类型
15 1 machenhe
** 1:普通类型
16
** 2:loading类型
17
** 3:导航类型
18
19 2 yangdefeng
* 参数3: 按钮图片,为loading类型时,loading前后允许使用不同按钮图片
20 1 machenhe
** 格式:按钮图片,loading图片,loading时间(毫秒),loading开始后的按钮文字
21
22 3 tejie
* 参数4: 按钮坐标及屏幕锚点
23 4 tejie
** 格式:x,y,屏幕锚点
24 3 tejie
屏幕锚点 1-9,对应屏幕上九个点
25
依次为
26
左上,中上,右上
27
左中,正中,右中
28
左下,中下,右下
29
锚点缺省为正中
30 1 machenhe
31 2 yangdefeng
* 参数5: 按钮文字
32 1 machenhe
33 2 yangdefeng
* 参数6: 字色, [[颜色编码id]] [0-255]
34 1 machenhe
35 2 yangdefeng
* 参数7: 字号
36 1 machenhe
37 2 yangdefeng
* 参数8: 文字坐标
38 1 machenhe
39 2 yangdefeng
* 参数9: 文字背景图片名称
40 1 machenhe
41 2 yangdefeng
* 参数10: 导航坐标及终点光圈设置,只有类型为3时有用
42 1 machenhe
** 格式:x,y,光圈的半径,是否隐藏光圈(0:不隐藏,1:隐藏)
43
44 2 yangdefeng
* 参数11: 跳转方法,可多个跳转,用于不同阶段的执行操作, %{color:red}不加@%
45 1 machenhe
** 参数2=2:类型2的按钮触发3个跳转链接,点击按钮触发第1个指定@块,进度条走完触发第2个指定@块,离开光圈范围触发第3个指定@块,特别注意参数格式为@1,@2|@3
46
47 2 yangdefeng
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
48 1 machenhe
49
bq. [<notextile>@</notextile>数值定义]
50
#act
51
MOV S$宝藏地图名 土城
52
MOV N$宝藏坐标x 80
53
MOV N$宝藏坐标y 53
54
goto <notextile>@</notextile>判断地图
55
56
57
bq. [<notextile>@</notextile>判断地图]
58
#if
59
not isOnMap <$str(S$宝藏地图名)>
60
#ACT
61
 %{color:lightgrey};添加普通可点击按钮%
62
addMainCenterBtn 点击寻找按钮 1 lc_dianjixunzhao 0,-100 点击寻找 151 24 0,-170 lc_ditu_mc_di 0,0,0,0 点击寻找
63
#elseact
64
goto <notextile>@</notextile>寻路中
65
66
67
bq. [<notextile>@</notextile>点击寻找]
68
#ACT
69
mapmove <$str(S$宝藏地图名)>
70
delaygoto 300 <notextile>@</notextile>自动寻路
71
 %{color:lightgrey};删除按钮,并添加新的导航类型按钮%
72
delMainCenterBtn 点击寻找按钮
73
 %{color:lightgrey};触发执行方法“寻路中”,到达目标点后执行方法“到达终点”%
74
addMainCenterBtn 寻路中按钮 3 lc_xunluzhizhen 0,-100 寻路中 250 32 0,-183 lc_ditu_mc_di <$str(N$宝藏坐标x)>,<$str(N$宝藏坐标y)>,5,1 寻路中,到达终点
75
76
77
bq. [<notextile>@</notextile>自动寻路]
78
#ACT
79
autogotoxy 土城 <$str(N$宝藏坐标x)> <$str(N$宝藏坐标y)>
80
81
82
bq. [<notextile>@</notextile>寻路中]
83
#act
84
delMainCenterBtn 点击寻找按钮
85
addMainCenterBtn 寻路中按钮 3 lc_xunluzhizhen 0,-100 寻路中 250 32 0,-183 lc_ditu_mc_di <$str(N$宝藏坐标x)>,<$str(N$宝藏坐标y)>,5,1 寻路中,到达终点
86
autogotoxy 土城 <$str(N$宝藏坐标x)> <$str(N$宝藏坐标y)>
87
88
bq. [<notextile>@</notextile>到达终点]
89
#ACT
90
delMainCenterBtn 寻路中按钮
91
 %{color:lightgrey};添加loading类型按钮,使用多张按钮图片,设置loading前、loading中和loading后的样式。触发时执行“到达终点”,loading完成后执行“进度条走完”,离开光圈执行“离开终点”%
92
addMainCenterBtn 挖掘按钮 2 lc_wajue,lc_caiji_jishi2,5000,挖掘中 0,-100 挖掘宝藏 250 32 0,-183 lc_wajue_di <$str(N$宝藏坐标x)>,<$str(N$宝藏坐标y)>,5,0 到达终点,进度条走完|离开终点
93
94
95
bq. [<notextile>@</notextile>进度条走完]
96
#ACT
97
sendmsg 6 进度条走完
98
delMainCenterBtn 挖掘按钮
99
100
101
bq. [<notextile>@</notextile>离开终点]
102
#act
103
delMainCenterBtn 挖掘按钮
104
addMainCenterBtn 寻路中按钮 3 lc_xunluzhizhen 0,-100 寻路中 250 32 0,-183 lc_ditu_mc_di <$str(N$宝藏坐标x)>,<$str(N$宝藏坐标y)>,5,1 寻路中,到达终点