Переглянути джерело

Merge pull request #1107 from ljxun/dev_1

feat(right_activity): 对弈竞猜
huangrunheng 1 рік тому
батько
коміт
0833a308e0

+ 2 - 0
tasks/Component/RightActivity/assets.py

@@ -15,5 +15,7 @@ class RightActivityAssets:
 	I_RA_OPEN = RuleImage(roi_front=(1257,78,22,58), roi_back=(1257,78,22,58), threshold=0.8, method="Template matching", file="./tasks/Component/RightActivity/ra/ra_ra_open.png")
 	I_RA_OPEN = RuleImage(roi_front=(1257,78,22,58), roi_back=(1257,78,22,58), threshold=0.8, method="Template matching", file="./tasks/Component/RightActivity/ra/ra_ra_open.png")
 	# description 
 	# description 
 	I_RA_CLOSE = RuleImage(roi_front=(1256,123,23,44), roi_back=(1256,123,23,44), threshold=0.8, method="Template matching", file="./tasks/Component/RightActivity/ra/ra_ra_close.png")
 	I_RA_CLOSE = RuleImage(roi_front=(1256,123,23,44), roi_back=(1256,123,23,44), threshold=0.8, method="Template matching", file="./tasks/Component/RightActivity/ra/ra_ra_close.png")
+	# description 
+	I_TOGGLE_BUTTON = RuleImage(roi_front=(1193,463,27,25), roi_back=(1169,146,73,403), threshold=0.8, method="Template matching", file="./tasks/Component/RightActivity/ra/as_toggle_button.png")
 
 
 
 

BIN
tasks/Component/RightActivity/ra/as_toggle_button.png


+ 9 - 0
tasks/Component/RightActivity/ra/image.json

@@ -16,5 +16,14 @@
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
+  },
+  {
+    "itemName": "toggle_button",
+    "imageName": "as_toggle_button.png",
+    "roiFront": "1193,463,27,25",
+    "roiBack": "1169,146,73,403",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
   }
   }
 ]
 ]

+ 2 - 1
tasks/Component/RightActivity/right_activity.py

@@ -15,7 +15,8 @@ class RightActivity(GameUi, RightActivityAssets):
         self.ui_get_current_page()
         self.ui_get_current_page()
         self.ui_goto(page_main)
         self.ui_goto(page_main)
 
 
-        self.ui_click_until_disappear(target, interval=3.5)
+        self.ui_click(self.I_TOGGLE_BUTTON, target, interval=2)
+        self.ui_click_until_disappear(target, interval=3)
 
 
     def right_open(self):
     def right_open(self):
         self.ui_click(self.I_RA_CLOSE, self.I_RA_OPEN, interval=2)
         self.ui_click(self.I_RA_CLOSE, self.I_RA_OPEN, interval=2)