Skip to content

Commit

Permalink
将自动选择英雄改为亮起而不是锁定 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Sep 13, 2023
1 parent fac5c5c commit 0b9840c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/lol/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def getChampSelectSession(self):

return res

# 选择英雄(直接确定)
# 选择英雄
def selectChampion(self, championId):
session = self.__get("/lol-champ-select/v1/session").json()

Expand All @@ -325,7 +325,7 @@ def selectChampion(self, championId):
data = {
"championId": championId,
'type': 'pick',
'completed': True,
# 'completed': True,
}

res = self.__patch(
Expand Down
4 changes: 3 additions & 1 deletion app/view/auxiliary_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def setEnabled(self, a0: bool) -> None:
self.onlineAvailabilityCard.clear()
self.onlineAvailabilityCard.comboBox.setEnabled(a0)

self.autoSelectChampionCard.lineEdit.setEnabled(a0)
if not cfg.get(cfg.enableAutoSelectChampion):
self.autoSelectChampionCard.lineEdit.setEnabled(a0)

self.removeTokensCard.pushButton.setEnabled(a0)

Expand Down Expand Up @@ -585,6 +586,7 @@ def __init__(self, title, content=None, enableConfigItem: ConfigItem = None,
self.tr("Champion name"))
self.lineEdit.setMinimumWidth(190)
self.lineEdit.setClearButtonEnabled(True)
self.lineEdit.setEnabled(False)

self.completer = None
self.champions = []
Expand Down

0 comments on commit 0b9840c

Please sign in to comment.