mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 15:07:22 +08:00
Refactor: 抽象出处理确认弹窗的逻辑
- 删除了一些无用的assets - 纠正了一些拼写错误
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from module.base.timer import Timer
|
||||
from module.equipment.assets import *
|
||||
from module.handler.info_bar import InfoBarHandler
|
||||
from module.handler.popup import PopupHandler
|
||||
from module.logger import logger
|
||||
from module.ui.assets import BACK_ARROW
|
||||
|
||||
@@ -8,7 +9,7 @@ SWIPE_DISTANCE = 250
|
||||
SWIPE_RANDOM_RANGE = (-40, -20, 40, 20)
|
||||
|
||||
|
||||
class Equipment(InfoBarHandler):
|
||||
class Equipment(InfoBarHandler, PopupHandler):
|
||||
equipment_has_take_on = False
|
||||
|
||||
def _view_swipe(self, distance):
|
||||
@@ -78,7 +79,7 @@ class Equipment(InfoBarHandler):
|
||||
off_timer.reset()
|
||||
continue
|
||||
|
||||
if confirm_timer.reached() and self.appear_then_click(EQUIP_OFF_CONFIRM, offset=10):
|
||||
if confirm_timer.reached() and self.handle_popup_confirm():
|
||||
confirm_timer.reset()
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user