Explorar el Código

feat(GameUi): 添加登录表单检查图像规则并优化相关功能

ChengRanORZ hace 2 años
padre
commit
69f4f4ebff

+ 2 - 2
tasks/Component/SwitchAccount/login_account.py

@@ -115,11 +115,11 @@ class LoginAccount(BaseTask, SwitchAccountAssets):
                 from copy import deepcopy
                 from copy import deepcopy
                 tmpClick = RuleClick(
                 tmpClick = RuleClick(
                     roi_back=deepcopy(tmp.roi),
                     roi_back=deepcopy(tmp.roi),
-                    roi_front=(
+                    roi_front=[
                         tmp.roi[0] + ocrResBoxList[index][0][0],
                         tmp.roi[0] + ocrResBoxList[index][0][0],
                         tmp.roi[1] + ocrResBoxList[index][0][1],
                         tmp.roi[1] + ocrResBoxList[index][0][1],
                         ocrResBoxList[index][1][0] - ocrResBoxList[index][0][0],
                         ocrResBoxList[index][1][0] - ocrResBoxList[index][0][0],
-                        ocrResBoxList[index][2][1] - ocrResBoxList[index][1][1]),
+                        ocrResBoxList[index][2][1] - ocrResBoxList[index][1][1]],
                     name="tmpClick"
                     name="tmpClick"
                 )
                 )
 
 

+ 7 - 0
tasks/GameUi/assets.py

@@ -32,6 +32,8 @@ class GameUiAssets:
 	# Image Rule Assets
 	# Image Rule Assets
 	# description 
 	# description 
 	I_CHECK_MAIN = RuleImage(roi_front=(801,109,38,37), roi_back=(49,98,1033,61), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_main.png")
 	I_CHECK_MAIN = RuleImage(roi_front=(801,109,38,37), roi_back=(49,98,1033,61), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_main.png")
+	# 庭院卷轴关闭标识 
+	I_MAIN_SCROLL_CLOSE = RuleImage(roi_front=(1181,634,28,39), roi_back=(1162,595,77,112), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_scroll_close.png")
 	# description 
 	# description 
 	I_MAIN_GOTO_EXPLORATION = RuleImage(roi_front=(493,116,45,75), roi_back=(243,100,933,211), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_exploration.png")
 	I_MAIN_GOTO_EXPLORATION = RuleImage(roi_front=(493,116,45,75), roi_back=(243,100,933,211), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_exploration.png")
 	# description 
 	# description 
@@ -170,6 +172,11 @@ class GameUiAssets:
 	I_NEW = RuleImage(roi_front=(0,0,100,100), roi_back=(0,0,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/image_name.png")
 	I_NEW = RuleImage(roi_front=(0,0,100,100), roi_back=(0,0,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/image_name.png")
 
 
 
 
+	# Image Rule Assets
+	# description 
+	I_CHECK_LOGIN_FORM = RuleImage(roi_front=(178,572,53,60), roi_back=(1,500,400,150), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_login_form.png")
+
+
 	# Image Rule Assets
 	# Image Rule Assets
 	# description 
 	# description 
 	I_MAIN_GOTO_SUMMON = RuleImage(roi_front=(1073,174,57,65), roi_back=(571,153,586,124), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_summon.png")
 	I_MAIN_GOTO_SUMMON = RuleImage(roi_front=(1073,174,57,65), roi_back=(571,153,586,124), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_summon.png")

BIN
tasks/GameUi/page/page_check_login_form.png


+ 11 - 0
tasks/GameUi/page/page_img_login.json

@@ -0,0 +1,11 @@
+[
+  {
+    "itemName": "check_login_form",
+    "imageName": "page_check_login_form.png",
+    "roiFront": "178,572,53,60",
+    "roiBack": "1,500,400,150",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  }
+]

BIN
tasks/GameUi/page/page_main_scroll_close.png