diff --git a/assets/share/base/page/MAP_EXIT.png b/assets/share/base/page/MAP_EXIT.png new file mode 100644 index 000000000..e6ada3db9 Binary files /dev/null and b/assets/share/base/page/MAP_EXIT.png differ diff --git a/tasks/base/assets/assets_base_page.py b/tasks/base/assets/assets_base_page.py index 95d2a0d36..cd6663cba 100644 --- a/tasks/base/assets/assets_base_page.py +++ b/tasks/base/assets/assets_base_page.py @@ -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( diff --git a/tasks/base/ui.py b/tasks/base/ui.py index 9f5b200d1..e606e2968 100644 --- a/tasks/base/ui.py +++ b/tasks/base/ui.py @@ -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)