diff --git a/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.2.png b/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.2.png index b7a6ddea1..69a3bd91b 100644 Binary files a/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.2.png and b/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.2.png differ diff --git a/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.png b/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.png index 5dd771be9..b824f42c8 100644 Binary files a/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.png and b/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.png differ diff --git a/tasks/assignment/assets/assets_assignment_dispatch.py b/tasks/assignment/assets/assets_assignment_dispatch.py index 6cd2bcf67..b5821f627 100644 --- a/tasks/assignment/assets/assets_assignment_dispatch.py +++ b/tasks/assignment/assets/assets_assignment_dispatch.py @@ -43,17 +43,17 @@ ASSIGNMENT_STARTED_CHECK = ButtonWrapper( share=[ Button( file='./assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.png', - area=(542, 412, 1156, 422), - search=(522, 392, 1176, 442), - color=(232, 230, 226), - button=(542, 412, 1156, 422), + area=(509, 317, 525, 383), + search=(489, 297, 545, 403), + color=(231, 231, 225), + button=(509, 317, 525, 383), ), Button( file='./assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.2.png', - area=(542, 412, 1156, 422), - search=(522, 392, 1176, 442), - color=(254, 244, 221), - button=(542, 412, 1156, 422), + area=(508, 316, 526, 384), + search=(488, 296, 546, 404), + color=(225, 217, 196), + button=(508, 316, 526, 384), ), ], ) diff --git a/tasks/assignment/ui.py b/tasks/assignment/ui.py index 60e8cde5e..a3d2b3a9b 100644 --- a/tasks/assignment/ui.py +++ b/tasks/assignment/ui.py @@ -151,19 +151,23 @@ class AssignmentUI(UI): Args: group (AssignmentGroup): + Returns: + bool: If group switched + Examples: self = AssignmentUI('src') self.device.screenshot() self.goto_group(KEYWORDS_ASSIGNMENT_GROUP.Character_Materials) """ - if ASSIGNMENT_GROUP_SWITCH.get(self) == group: - if not ASSIGNMENT_ENTRY_LIST.cur_buttons: - ASSIGNMENT_ENTRY_LIST.load_rows(self) - return logger.hr('Assignment group goto', level=3) if ASSIGNMENT_GROUP_SWITCH.set(group, self): self._wait_until_entry_loaded() self._wait_until_correct_entry_loaded(group) + return True + else: + if not ASSIGNMENT_ENTRY_LIST.cur_buttons: + ASSIGNMENT_ENTRY_LIST.load_rows(self) + return False def goto_entry(self, entry: AssignmentEntry, insight: bool = True): """ @@ -185,8 +189,11 @@ class AssignmentUI(UI): return raise ScriptError(err_msg) else: - self.goto_group(entry.group) - ASSIGNMENT_ENTRY_LIST.select_row(entry, self, insight=insight) + if self.goto_group(entry.group): + # Already insight in goto_group() - _wait_until_correct_entry_loaded() + ASSIGNMENT_ENTRY_LIST.select_row(entry, self, insight=False) + else: + ASSIGNMENT_ENTRY_LIST.select_row(entry, self, insight=insight) def _wait_until_group_loaded(self): skip_first_screenshot = True