mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-19 23:33:33 +08:00
Add: island storage scanner
This commit is contained in:
@@ -2,7 +2,7 @@ from module.base.button import ButtonGrid
|
||||
from module.base.decorator import cached_property
|
||||
from module.island.assets import *
|
||||
from module.ui.navbar import Navbar
|
||||
from module.ui.scroll import Scroll
|
||||
from module.ui.scroll import AdaptiveScroll, Scroll
|
||||
from module.ui.ui import UI
|
||||
|
||||
|
||||
@@ -12,6 +12,12 @@ ISLAND_SEASON_TASK_SCROLL = Scroll(
|
||||
name="ISLAND_SEASON_TASK_SCROLL"
|
||||
)
|
||||
|
||||
ISLAND_STORAGE_SCROLL = AdaptiveScroll(
|
||||
ISLAND_STORAGE_SCROLL_AREA.button,
|
||||
background=1,
|
||||
name="ISLAND_STORAGE_SCROLL"
|
||||
)
|
||||
|
||||
|
||||
class IslandUI(UI):
|
||||
def ui_additional(self, get_ship=True):
|
||||
@@ -38,6 +44,25 @@ class IslandUI(UI):
|
||||
active_count=500,
|
||||
inactive_count=500)
|
||||
|
||||
@cached_property
|
||||
def _island_storage_side_navbar(self):
|
||||
"""
|
||||
3 options:
|
||||
material,
|
||||
consumable,
|
||||
special
|
||||
"""
|
||||
island_storage_side_navbar = ButtonGrid(
|
||||
origin=(164, 154), delta=(0, 106.5),
|
||||
button_shape=(64, 64), grid_shape=(1, 3),
|
||||
name='ISLAND_STORAGE_SIDE_NAVBAR'
|
||||
)
|
||||
return Navbar(grids=island_storage_side_navbar,
|
||||
active_color=(57, 189, 255),
|
||||
inactive_color=(57, 58, 64),
|
||||
active_count=500,
|
||||
inactive_count=500)
|
||||
|
||||
def island_season_bottom_navbar_ensure(self, left=None, right=None):
|
||||
"""
|
||||
Args:
|
||||
@@ -56,4 +81,20 @@ class IslandUI(UI):
|
||||
"""
|
||||
if self._island_season_bottom_navbar.set(self, left=left, right=right):
|
||||
return True
|
||||
return False
|
||||
return False
|
||||
|
||||
def island_storage_side_navbar_ensure(self, upper=None, bottom=None):
|
||||
"""
|
||||
Args:
|
||||
upper (int):
|
||||
1 for material,
|
||||
2 for consumable,
|
||||
3 for special
|
||||
bottom (int):
|
||||
1 for special,
|
||||
2 for consumable,
|
||||
3 for material
|
||||
"""
|
||||
if self._island_storage_side_navbar.set(self, upper=upper, bottom=bottom):
|
||||
return True
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user