mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 21:27:01 +08:00
Refactor: Standardize the use of match_template_color()
This commit is contained in:
@@ -50,7 +50,7 @@ class LoginHandler(UI):
|
||||
confirm_timer.reset()
|
||||
|
||||
# Login
|
||||
if self.appear(LOGIN_CHECK, offset=(30, 30), interval=5) and LOGIN_CHECK.match_appear_on(self.device.image):
|
||||
if self.match_template_color(LOGIN_CHECK, offset=(30, 30), interval=5):
|
||||
self.device.click(LOGIN_CHECK)
|
||||
if not login_success:
|
||||
logger.info('Login success')
|
||||
|
||||
@@ -217,8 +217,7 @@ class StrategyHandler(InfoHandler):
|
||||
in: STRATEGY_OPENED
|
||||
out: STRATEGY_OPENED
|
||||
"""
|
||||
if (self.appear(MOB_MOVE_ENTER, offset=MOB_MOVE_OFFSET)
|
||||
and MOB_MOVE_ENTER.match_appear_on(self.device.image)):
|
||||
if self.match_template_color(MOB_MOVE_ENTER, offset=MOB_MOVE_OFFSET):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user