mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 02:48:23 +08:00
Opt: Remove ensure main after task finishes
- Clear offset of GOTO_MAIN to avoid clicking outside of screen
This commit is contained in:
@@ -104,6 +104,9 @@ class Button:
|
||||
offset = np.subtract(button.button, button._button)[:2]
|
||||
self._button_offset = area_offset(self._button, offset=offset)
|
||||
|
||||
def clear_offset(self):
|
||||
self._button_offset = None
|
||||
|
||||
def ensure_template(self):
|
||||
"""
|
||||
Load asset image.
|
||||
|
||||
@@ -274,6 +274,10 @@ class RewardTacticalClass(UI):
|
||||
self.ui_goto(page_tactical, skip_first_screenshot=True)
|
||||
self._tactical_get_finish()
|
||||
|
||||
# Can't stay in page_tactical
|
||||
# There will be popups after tactical finished
|
||||
self.ui_goto(page_reward)
|
||||
|
||||
if self.tactical_finish:
|
||||
self.config.task_delay(target=self.tactical_finish)
|
||||
else:
|
||||
|
||||
@@ -159,6 +159,7 @@ class UI(InfoHandler):
|
||||
logger.hr(f'UI goto {destination}')
|
||||
confirm_timer = Timer(confirm_wait, count=int(confirm_wait // 0.5)).start()
|
||||
while 1:
|
||||
GOTO_MAIN.clear_offset()
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user