Fix: Consider abyssal map as page_main

This commit is contained in:
LmeSzinc 2023-09-22 12:35:38 +08:00
parent ee7cd3958d
commit d3239ac3e5
3 changed files with 12 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -253,6 +253,16 @@ MAP_CHECK = ButtonWrapper(
button=(46, 19, 68, 54),
),
)
MAP_EXIT = ButtonWrapper(
name='MAP_EXIT',
share=Button(
file='./assets/share/base/page/MAP_EXIT.png',
area=(27, 46, 44, 74),
search=(7, 26, 64, 94),
color=(142, 144, 148),
button=(27, 46, 44, 74),
),
)
MAP_GOTO_WORLD = ButtonWrapper(
name='MAP_GOTO_WORLD',
share=Button(

View File

@ -4,7 +4,7 @@ from module.base.timer import Timer
from module.exception import GameNotRunningError, GamePageUnknownError
from module.logger import logger
from module.ocr.ocr import Ocr
from tasks.base.assets.assets_base_page import CLOSE
from tasks.base.assets.assets_base_page import CLOSE, MAP_EXIT
from tasks.base.main_page import MainPage
from tasks.base.page import Page, page_main
from tasks.base.popup import PopupHandler
@ -271,7 +271,7 @@ class UI(PopupHandler, MainPage):
continue
def is_in_main(self):
return self.appear(page_main.check_button)
return self.appear(page_main.check_button) or self.appear(MAP_EXIT)
def ui_goto_main(self):
return self.ui_ensure(destination=page_main)