mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 03:58:22 +08:00
Merge branch 'dev'
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from module.base.button import Button
|
||||
from module.base.template import Template
|
||||
|
||||
# This file was automatically generated by dev_tools.button_extract.
|
||||
# This file was automatically generated by dev_tools/button_extract.py.
|
||||
# Don't modify it manually.
|
||||
|
||||
AUTO_SEARCH_MAP_OPTION_OFF = Button(area={'cn': (1205, 549, 1275, 566), 'en': (1203, 552, 1277, 564), 'jp': (1204, 547, 1276, 568), 'tw': (1205, 546, 1275, 567)}, color={'cn': (196, 169, 169), 'en': (151, 132, 138), 'jp': (179, 153, 156), 'tw': (153, 132, 137)}, button={'cn': (1205, 549, 1275, 566), 'en': (1203, 552, 1277, 564), 'jp': (1204, 547, 1276, 568), 'tw': (1205, 546, 1275, 567)}, file={'cn': './assets/cn/handler/AUTO_SEARCH_MAP_OPTION_OFF.png', 'en': './assets/en/handler/AUTO_SEARCH_MAP_OPTION_OFF.png', 'jp': './assets/jp/handler/AUTO_SEARCH_MAP_OPTION_OFF.png', 'tw': './assets/tw/handler/AUTO_SEARCH_MAP_OPTION_OFF.png'})
|
||||
|
||||
@@ -8,7 +8,7 @@ from module.ui.switch import Switch
|
||||
fast_forward = Switch('Fast_Forward')
|
||||
fast_forward.add_status('on', check_button=FAST_FORWARD_ON)
|
||||
fast_forward.add_status('off', check_button=FAST_FORWARD_OFF)
|
||||
fleet_lock = Switch('Fleet_Lock', offset=(5, 5))
|
||||
fleet_lock = Switch('Fleet_Lock', offset=(5, 20))
|
||||
fleet_lock.add_status('on', check_button=FLEET_LOCKED)
|
||||
fleet_lock.add_status('off', check_button=FLEET_UNLOCKED)
|
||||
auto_search = Switch('Auto_Search', offset=(20, 20))
|
||||
@@ -126,14 +126,23 @@ class FastForwardHandler(AutoSearchHandler):
|
||||
changed = fast_forward.set(status=status, main=self)
|
||||
return changed
|
||||
|
||||
def handle_map_fleet_lock(self):
|
||||
def handle_map_fleet_lock(self, enable=None):
|
||||
"""
|
||||
Args:
|
||||
enable (bool): Default to None, use Campaign_UseFleetLock.
|
||||
|
||||
Returns:
|
||||
bool: If switched.
|
||||
"""
|
||||
# Fleet lock depends on if it appear on map, not depends on map status.
|
||||
# Because if already in map, there's no map status,
|
||||
if not fleet_lock.appear(main=self):
|
||||
logger.info('No fleet lock option.')
|
||||
return False
|
||||
|
||||
status = 'on' if self.config.Campaign_UseFleetLock else 'off'
|
||||
if enable is None:
|
||||
enable = self.config.Campaign_UseFleetLock
|
||||
status = 'on' if enable else 'off'
|
||||
changed = fleet_lock.set(status=status, main=self)
|
||||
|
||||
return changed
|
||||
|
||||
Reference in New Issue
Block a user