1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-04-02 10:44:08 +08:00

Sync: [ALAS] Refactored Switch.set()

This commit is contained in:
LmeSzinc
2024-12-10 03:28:20 +08:00
parent 386a2482ad
commit 4ab8337324
17 changed files with 191 additions and 133 deletions

View File

@@ -15,12 +15,12 @@ MEOWFFICER_SHIFT_DETECT = Button(
name='MEOWFFICER_SHIFT_DETECT')
SWITCH_LOCK = Switch(name='Meowfficer_Lock', offset=(40, 40))
SWITCH_LOCK.add_status(
SWITCH_LOCK.add_state(
'lock',
check_button=MEOWFFICER_APPLY_UNLOCK,
click_button=MEOWFFICER_APPLY_LOCK
)
SWITCH_LOCK.add_status(
SWITCH_LOCK.add_state(
'unlock',
check_button=MEOWFFICER_APPLY_LOCK,
click_button=MEOWFFICER_APPLY_UNLOCK
@@ -175,7 +175,7 @@ class MeowfficerCollect(MeowfficerBase):
lock (bool):
"""
# Apply designated lock status
SWITCH_LOCK.set(status='lock' if lock else 'unlock', main=self)
SWITCH_LOCK.set('lock' if lock else 'unlock', main=self)
# Wait until info bar disappears
self.ensure_no_info_bar(timeout=1)