diff --git a/tasks/schedule/schedule.py b/tasks/schedule/schedule.py index 3ae56eb..423146b 100644 --- a/tasks/schedule/schedule.py +++ b/tasks/schedule/schedule.py @@ -114,6 +114,7 @@ class Schedule(ScheduleUI): def run(self): self.ui_ensure(page_schedule) self.task = self.valid_task + self.set_clickx() action_timer = Timer(0.5, 1) status = ScheduleStatus.OCR diff --git a/tasks/schedule/ui.py b/tasks/schedule/ui.py index fbd59a7..4de7df4 100644 --- a/tasks/schedule/ui.py +++ b/tasks/schedule/ui.py @@ -1,4 +1,5 @@ from module.base.timer import Timer +from module.base.decorator import Config from module.logger import logger from module.ocr.ocr import DigitCounter from tasks.base.ui import UI @@ -7,12 +8,19 @@ from tasks.schedule.assets.assets_schedule import * from tasks.schedule.scroll_select import ScrollSelect import numpy as np - -SCROLL_SELECT = ScrollSelect(window_button=SCROLL, first_item_button=FIRST_ITEM, expected_button=LOCATIONS, clickx=1116) +SCROLL_SELECT = ScrollSelect(window_button=SCROLL, first_item_button=FIRST_ITEM, expected_button=LOCATIONS, clickx=1114) xs = np.linspace(299, 995, 3, dtype=int) ys = np.linspace(268, 573, 3, dtype=int) class ScheduleUI(UI): + @Config.when(Emulator_GameLanguage='en') + def set_clickx(self): + SCROLL_SELECT.clickx = 1114 + + @Config.when(Emulator_GameLanguage=None) + def set_clickx(self): + pass + def select_then_check(self, dest_enter: ButtonWrapper, dest_check: ButtonWrapper): timer = Timer(8, 10).start() while 1: