fix:对按钮使用模板匹配,添加说明注释

This commit is contained in:
Hydrogina
2022-08-14 00:27:56 +08:00
parent 33e89ad993
commit 700f6ae803
3 changed files with 13 additions and 10 deletions

View File

@@ -4532,17 +4532,16 @@
"rearDelay": 1000
},
"InfrastFilterMenuNotStationedButton": {
"algorithm": "OcrDetect",
"action": "ClickSelf",
"text": [
"未进驻"
],
"template": "InfrastFilterMenuNotStationedButton.png",
"cache": false,
"roi": [
362,
338,
151,
43
359,
335,
158,
49
],
"rearDelay": 1000,
"next": [
"InfrastFilterMenuConfirmButton"
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -65,7 +65,7 @@ bool asst::InfrastDormTask::opers_choose()
}
switch (oper.smiley.type) {
case infrast::SmileyType::Rest:
// 如果当前页面休息完成的人数超过5个说明已经已经把所有心情不满的滑过一遍、没有更多的了
// 如果所有心情不满的干员已经放入宿舍,就把信赖不满的干员放入宿舍
if (m_finished_stage > 0 && oper.selected == false && oper.doing != infrast::Doing::Working && oper.doing != infrast::Doing::Resting) {
m_ctrler->click(oper.rect);
if (++num_of_selected >= max_num_of_opers()) {
@@ -73,13 +73,14 @@ bool asst::InfrastDormTask::opers_choose()
break;
}
}
// 如果当前页面休息完成的人数超过5个说明已经已经把所有心情不满的滑过一遍、没有更多的了
else if (++num_of_resting > max_num_of_opers()) {
Log.trace("num_of_resting:", num_of_resting, ", dorm finished");
Log.trace("click_filter_menu_not_stationed_button");
click_filter_menu_not_stationed_button();
Log.trace("click_sort_by_trust_button");
click_sort_by_trust_button();
m_finished_stage = 1;
m_finished_stage = 1;// 选中未进驻标签并按信赖值排序
}
break;
case infrast::SmileyType::Work:
@@ -96,18 +97,21 @@ bool asst::InfrastDormTask::opers_choose()
default:
break;
}
// 按信赖排序后需要重新识图,中断循环
if (m_finished_stage == 1) {
break;
}
}
if (num_of_selected >= max_num_of_opers()) {
Log.trace("num_of_selected:", num_of_selected, ", just break");
// 若当前宿舍已满人,则按信赖排序后不需要跳过滑动列表
if (m_finished_stage == 1) {
m_finished_stage = 2;
}
break;
}
// 若当前宿舍未满人,则按信赖排序后需要跳过一次滑动列表
if (m_finished_stage == 1) {
m_finished_stage = 2;
}