mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-23 09:01:45 +00:00
ad73de92dd
- 删除了一些无用的assets - 纠正了一些拼写错误
23 lines
758 B
Python
23 lines
758 B
Python
from module.base.base import ModuleBase
|
|
from module.handler.assets import POPUP_CANCEL, POPUP_CONFIRM
|
|
|
|
|
|
class PopupHandler(ModuleBase):
|
|
_popup_offset = (3, 30)
|
|
|
|
def handle_popup_confirm(self):
|
|
if self.appear(POPUP_CANCEL, offset=self._popup_offset) \
|
|
and self.appear(POPUP_CONFIRM, offset=self._popup_offset, interval=2):
|
|
self.device.click(POPUP_CONFIRM)
|
|
return True
|
|
else:
|
|
return False
|
|
|
|
def handle_popup_cancel(self):
|
|
if self.appear(POPUP_CONFIRM, offset=self._popup_offset) \
|
|
and self.appear(POPUP_CANCEL, offset=self._popup_offset, interval=2):
|
|
self.device.click(POPUP_CANCEL)
|
|
return True
|
|
else:
|
|
return False
|