Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiramei committed Dec 22, 2023
1 parent 879a005 commit e7f8ee4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions gui/components/expand/expandTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None
currentKey = cfg.key
inputComponent = SwitchButton(self)
inputComponent.setChecked(self.get(currentKey))
inputComponent.setChecked(self._get(currentKey))
inputComponent.checkedChanged.connect(partial(self._commit, currentKey, inputComponent, labelComponent))
elif cfg.type == 'combo':
currentKey = cfg.key
inputComponent = ComboBox(self)
inputComponent.addItems(cfg.selection)
inputComponent.setCurrentIndex(cfg.selection.index(self.get(currentKey)))
inputComponent.setCurrentIndex(cfg.selection.index(self._get(currentKey)))
inputComponent.currentIndexChanged.connect(
partial(self._commit, currentKey, inputComponent, labelComponent))
elif cfg.type == 'button':
Expand All @@ -62,6 +60,7 @@ def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None
elif cfg.type == 'text':
currentKey = cfg.key
inputComponent = LineEdit(self)
inputComponent.setText(self.get(currentKey))
confirmButton = PushButton('确定', self)
confirmButton.clicked.connect(partial(self._commit, currentKey, inputComponent, labelComponent))
elif cfg.type == 'label':
Expand Down Expand Up @@ -94,6 +93,3 @@ def _commit(self, key, target, labelTarget):
.parent().parent().parent().parent().parent()
)
infoChanged.show()

def _get(self, key):
return self.get(key)
2 changes: 2 additions & 0 deletions module/clear_special_task_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def commissions_common_operation(self, a, b):
to_commissions(self, a)

self.swipe(926, 140, 926, 640, duration=1)
time.sleep(1)
self.latest_img_array = self.get_screenshot_array()
i = 675
line = self.latest_img_array[:, 1076, :]
Expand Down Expand Up @@ -205,6 +206,7 @@ def commissions_common_operation(self, a, b):
to_commissions(self, a)

self.swipe(926, 188, 926, 381, duration=1)
time.sleep(1)
self.latest_img_array = self.get_screenshot_array()
line = self.latest_img_array[:, 1076, :]
i = 675
Expand Down
1 change: 1 addition & 0 deletions module/rewarded_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def bounty_common_operation(self, a, b):
to_bounty(self, a)

self.swipe(926, 190, 926, 650, duration=1)
time.sleep(1)
self.latest_img_array = self.get_screenshot_array()
line = self.latest_img_array[:, 1076, :]
los = []
Expand Down

0 comments on commit e7f8ee4

Please sign in to comment.