Просмотр исходного кода

fix(GameUi): 增加下载扩展包弹窗关闭识别

- 扩大GlobalGame中取消按钮(小)的ROI区域,提升弹窗关闭识别稳定性
- 在式神录等页面补充取消按钮识别,避免被弹窗遮挡后卡住流程
- 调整商店页面的附加识别项,统一优先处理返回与取消类弹窗
yuyuyuyuyu 7 месяцев назад
Родитель
Сommit
508d8bbf7d
3 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      tasks/GameUi/page.py
  2. 1 1
      tasks/GlobalGame/assets.py
  3. 1 1
      tasks/GlobalGame/ui/image.json

+ 2 - 2
tasks/GameUi/page.py

@@ -151,7 +151,7 @@ page_town.link(button=G.I_TOWN_GOTO_HYAKKIYAKOU, destination=page_hyakkiyakou)
 # ************************************* 庭院部分 *****************************************#
 # ************************************* 庭院部分 *****************************************#
 # 式神录 shikigami_records
 # 式神录 shikigami_records
 page_shikigami_records = Page(G.I_CHECK_RECORDS)
 page_shikigami_records = Page(G.I_CHECK_RECORDS)
-page_shikigami_records.additional = [G.I_AD_DISAPPEAR, G.I_RECORDS_CLOSE]
+page_shikigami_records.additional = [G.I_AD_DISAPPEAR, G.I_RECORDS_CLOSE, GGA.I_UI_CANCEL_SAMLL]
 page_shikigami_records.link(button=G.I_BACK_Y, destination=page_main)
 page_shikigami_records.link(button=G.I_BACK_Y, destination=page_main)
 page_main.link(button=G.I_MAIN_GOTO_SHIKIGAMI_RECORDS, destination=page_shikigami_records)
 page_main.link(button=G.I_MAIN_GOTO_SHIKIGAMI_RECORDS, destination=page_shikigami_records)
 # 阴阳术 onmyodo
 # 阴阳术 onmyodo
@@ -171,7 +171,7 @@ from tasks.DailyTrifles.assets import DailyTriflesAssets
 
 
 # 商店 mall
 # 商店 mall
 page_mall = Page(check_button=[G.I_CHECK_MALL, DailyTriflesAssets.I_ROOM_GIFT])
 page_mall = Page(check_button=[G.I_CHECK_MALL, DailyTriflesAssets.I_ROOM_GIFT])
-page_mall.additional = [G.I_AD_CLOSE_RED, G.I_BACK_Y, G.I_DLC_CLOSE]
+page_mall.additional = [G.I_AD_CLOSE_RED, GGA.I_UI_CANCEL_SAMLL, G.I_BACK_Y]
 page_mall.link(button=G.I_BACK_YOLLOW, destination=page_main)
 page_mall.link(button=G.I_BACK_YOLLOW, destination=page_main)
 page_main.link(button=G.I_MAIN_GOTO_MALL, destination=page_mall)
 page_main.link(button=G.I_MAIN_GOTO_MALL, destination=page_mall)
 # 阴阳寮 guild
 # 阴阳寮 guild

+ 1 - 1
tasks/GlobalGame/assets.py

@@ -56,7 +56,7 @@ class GlobalGameAssets:
 	# 短一点的确认 
 	# 短一点的确认 
 	I_UI_CONFIRM_SAMLL = RuleImage(roi_front=(681,392,130,62), roi_back=(558,380,265,99), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_confirm_samll.png")
 	I_UI_CONFIRM_SAMLL = RuleImage(roi_front=(681,392,130,62), roi_back=(558,380,265,99), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_confirm_samll.png")
 	# 短一点的取消 
 	# 短一点的取消 
-	I_UI_CANCEL_SAMLL = RuleImage(roi_front=(472,389,128,62), roi_back=(472,389,128,62), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_cancel_samll.png")
+	I_UI_CANCEL_SAMLL = RuleImage(roi_front=(472,389,128,62), roi_back=(360,377,272,185), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_cancel_samll.png")
 	# description 
 	# description 
 	I_UI_UNCHECK = RuleImage(roi_front=(567,343,33,36), roi_back=(497,303,216,100), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_uncheck.png")
 	I_UI_UNCHECK = RuleImage(roi_front=(567,343,33,36), roi_back=(497,303,216,100), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_uncheck.png")
 	# 勾选 
 	# 勾选 

+ 1 - 1
tasks/GlobalGame/ui/image.json

@@ -75,7 +75,7 @@
     "itemName": "ui_cancel_samll",
     "itemName": "ui_cancel_samll",
     "imageName": "ui_ui_cancel_samll.png",
     "imageName": "ui_ui_cancel_samll.png",
     "roiFront": "472,389,128,62",
     "roiFront": "472,389,128,62",
-    "roiBack": "472,389,128,62",
+    "roiBack": "360,377,272,185",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "短一点的取消"
     "description": "短一点的取消"