mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-15 22:19:18 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
8ed52d74bc
Binary file not shown.
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.5 KiB |
@ -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),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user