1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-01-04 14:35:13 +00:00

Compare commits

..

No commits in common. "a005a46a410f0f83ae18c649d7afb8b3c4ac1b93" and "962191d42369a6f181d24c48e419d4ac33d37ff8" have entirely different histories.

8 changed files with 11 additions and 38 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -261,21 +261,3 @@ NETWORK_RECONNECT_OK = ButtonWrapper(
button=(540, 471, 744, 530),
),
)
QUIT = ButtonWrapper(
name='QUIT',
jp=None,
en=Button(
file='./assets/en/base/popup/QUIT.png',
area=(587, 309, 688, 357),
search=(567, 289, 708, 377),
color=(225, 225, 225),
button=(410, 473, 623, 532),
),
zht=Button(
file='./assets/zht/base/popup/QUIT.png',
area=(556, 310, 713, 364),
search=(536, 290, 733, 384),
color=(215, 215, 215),
button=(411, 472, 620, 535),
),
)

View File

@ -116,11 +116,4 @@ class PopupHandler(ModuleBase):
if self.appear_then_click(LEVEL_UP, interval=interval):
return True
return False
def handle_quit(self, interval=5) -> bool:
if self.appear_then_click(QUIT, interval=interval):
return True
return False
return False

View File

@ -130,7 +130,7 @@ class UI(MainPage):
self.interval_clear(list(Page.iter_check_buttons()))
# loading_timer = Timer(0.5)
#back_timer = Timer(10, 10)
back_timer = Timer(10, 10)
logger.hr(f"UI goto {destination}")
while 1:
if skip_first_screenshot:
@ -177,14 +177,14 @@ class UI(MainPage):
if self.ui_additional():
continue
#back_timer.start()
#if back_timer.reached_and_reset():
# if self.match_color(LOGIN_LOADING, interval=5, threshold=80) or self.appear_trademark_year():
# from tasks.login.login import Login
# Login(self.config, self.device).handle_app_login()
# continue
# self.device.back()
# logger.info("Unknown page, try to back")
back_timer.start()
if back_timer.reached_and_reset():
if self.match_color(LOGIN_LOADING, interval=5, threshold=80) or self.appear_trademark_year():
from tasks.login.login import Login
Login(self.config, self.device).handle_app_login()
continue
self.device.back()
logger.info("Unknown page, try to back")
# Reset connection
Page.clear_connection()
@ -372,8 +372,6 @@ class UI(MainPage):
return True
if self.handle_daily_news():
return True
if self.handle_quit():
return True
if self.handle_network_reconnect():
return True
if self.handle_affection_level_up():

View File

@ -83,7 +83,7 @@ class Shop(ShopUI):
return ShopStatus.SELECT_SHOP
return ShopStatus.END
case ShopStatus.END:
if self.appear(page_shop.check_button) and self.match_color(page_shop.check_button):
if self.appear(page_shop.check_button):
self.task.pop(0)
return ShopStatus.SELECT_SHOP
self.click_with_interval(BACK, interval=2)