Fix: Handle popup story (fixed #690)

This commit is contained in:
LmeSzinc 2024-12-10 03:12:23 +08:00
parent 5f4a2933b5
commit de5092278f
4 changed files with 14 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -116,3 +116,13 @@ POPUP_SINGLE = ButtonWrapper(
button=(578, 451, 705, 489),
),
)
POPUP_STORY_LATER = ButtonWrapper(
name='POPUP_STORY_LATER',
share=Button(
file='./assets/share/base/popup/POPUP_STORY_LATER.png',
area=(392, 534, 416, 558),
search=(359, 527, 424, 565),
color=(111, 103, 91),
button=(392, 534, 416, 558),
),
)

View File

@ -6,6 +6,7 @@ from module.logger import logger
from module.ocr.ocr import Ocr
from tasks.base.assets.assets_base_main_page import ROGUE_LEAVE_FOR_NOW, ROGUE_LEAVE_FOR_NOW_OE
from tasks.base.assets.assets_base_page import CLOSE, MAIN_GOTO_CHARACTER, MAP_EXIT, MAP_EXIT_OE
from tasks.base.assets.assets_base_popup import POPUP_STORY_LATER
from tasks.base.main_page import MainPage
from tasks.base.page import Page, page_gacha, page_main
from tasks.combat.assets.assets_combat_finish import COMBAT_EXIT
@ -395,6 +396,9 @@ class UI(MainPage):
return True
if self.appear_then_click(INFO_CLOSE, interval=5):
return True
# Popup story that advice you watch it, but no, later
if self.appear_then_click(POPUP_STORY_LATER, interval=5):
return True
return False