Skip to content

Commit 8261a28

Browse files
perf: 允许指定活动导航模板名字
1 parent 76f1b0c commit 8261a28

6 files changed

Lines changed: 48 additions & 8 deletions

File tree

assets/resource/pipeline/活動.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"活动入口导航": {
1717
"recognition": "TemplateMatch",
18-
"template": "活动导航/活动入口.png",
18+
"template": "活动导航/{活动入口模板名称}.png",
1919
"action": "Click",
2020
"roi": [
2121
1083,
@@ -53,7 +53,7 @@
5353
},
5454
"关卡入口导航": {
5555
"recognition": "TemplateMatch",
56-
"template": "活动导航/关卡入口.png",
56+
"template": "活动导航/{关卡入口模板名称}.png",
5757
"action": "Click",
5858
"post_delay": 1000,
5959
"next": [

assets/resource/tasks/战役.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "自动战役",
55
"entry": "开始自动战役",
66
"default_check": false,
7-
"description": "<span style=\"color: red;\">需提前编好队,再开始</span>",
7+
"description": "<span style=\"color: red;\">需提前编好队,再开始</span>",
88
"option": [
99
"战役困难难度",
1010
"战役选择关卡",

assets/resource/tasks/活动.json

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@
166166
},
167167
{
168168
"name": "模板",
169-
"pipeline_override": {}
169+
"pipeline_override": {},
170+
"option": [
171+
"活动入口模板"
172+
]
170173
}
171174
]
172175
},
@@ -190,6 +193,40 @@
190193
}
191194
}
192195
},
196+
"活动入口模板": {
197+
"type": "input",
198+
"inputs": [
199+
{
200+
"name": "活动入口模板名称",
201+
"default": "{活动入口模板名称}",
202+
"pipeline_type": "string",
203+
"verify": ".+",
204+
"pattern_msg": "不能为空"
205+
}
206+
],
207+
"pipeline_override": {
208+
"活动入口导航": {
209+
"template": "活动导航/{活动入口模板名称}.png"
210+
}
211+
}
212+
},
213+
"关卡入口模板": {
214+
"type": "input",
215+
"inputs": [
216+
{
217+
"name": "关卡入口模板名称",
218+
"default": "{关卡入口模板名称}",
219+
"pipeline_type": "string",
220+
"verify": ".+",
221+
"pattern_msg": "不能为空"
222+
}
223+
],
224+
"pipeline_override": {
225+
"关卡入口导航": {
226+
"template": "活动导航/{关卡入口模板名称}.png"
227+
}
228+
}
229+
},
193230
"活动困难模式": {
194231
"type": "switch",
195232
"description": "如果需要选择“困难模式”,请勾选此项",
@@ -226,7 +263,10 @@
226263
},
227264
{
228265
"name": "模板",
229-
"pipeline_override": {}
266+
"pipeline_override": {},
267+
"option": [
268+
"关卡入口模板"
269+
]
230270
}
231271
]
232272
},

docs/zh_cn/自定义导航.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
1. 确保模拟器分辨率为720P,用模拟器自带的截图功能,截取活动入口和关卡入口界面
1010

11-
2. 参照**[MaaFramework文档](https://maafw.xyz/docs/1.1-QuickStarted#%E5%9B%BE%E5%83%8F%E7%B4%A0%E6%9D%90)**将截图裁剪合适大小,分别命名为活动入口.png,关卡入口.png
11+
2. 参照**[MaaFramework文档](https://maafw.xyz/docs/1.1-QuickStarted#%E5%9B%BE%E5%83%8F%E7%B4%A0%E6%9D%90)**将截图裁剪合适大小,保存为png格式
1212

13-
3. 将图片覆盖resource/image/活动导航中的同名文件后重启MRA
13+
3. 将图片覆盖resource/image/活动导航中的同名文件后重启MRA,然后在设置里输入图片名字(不含.png)
1414

1515
## 使用坐标识别
1616

@@ -22,4 +22,4 @@
2222

2323
将模拟器窗口调到1280*720大小(不是分辨率)
2424

25-
用QQ自带的截图从模拟器左上角框选到你想要的点位,此时截图大小即为对应坐标
25+
用QQ自带的截图从模拟器左上角框选到你想要的点位,此时截图尺寸即为对应坐标

0 commit comments

Comments
 (0)