mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 00:35:34 +00:00
Fix: Override click_button of BattlePassTab
This commit is contained in:
parent
b3c6c1f941
commit
7f96e98e50
@ -23,6 +23,14 @@ from tasks.item.assets.assets_item_ui import SWITCH_CLICK
|
||||
|
||||
|
||||
class BattlePassTab(Switch):
|
||||
def add_state(self, state, check_button, click_button=None):
|
||||
if click_button is not None:
|
||||
# Limit click_button.button
|
||||
left = SWITCH_CLICK.area[0]
|
||||
for button in click_button.buttons:
|
||||
button._button = (left, button._button[1], button._button[2], button._button[3])
|
||||
return super().add_state(state, check_button, click_button)
|
||||
|
||||
def handle_additional(self, main: UI):
|
||||
if main.handle_reward():
|
||||
return True
|
||||
@ -43,14 +51,6 @@ SWITCH_BATTLE_PASS_TAB.add_state(
|
||||
|
||||
|
||||
class BattlePassMissionTab(Switch):
|
||||
def add_state(self, state, check_button, click_button=None):
|
||||
if click_button is not None:
|
||||
# Limit click_button.button
|
||||
left = SWITCH_CLICK.area[0]
|
||||
for button in click_button.buttons:
|
||||
button._button = (left, button._button[1], button._button[2], button._button[3])
|
||||
return super().add_state(state, check_button, click_button)
|
||||
|
||||
def get(self, main):
|
||||
"""
|
||||
Args:
|
||||
|
Loading…
Reference in New Issue
Block a user