mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-08 12:27:33 +08:00
Opt: wait until navbar active is not None (#3832)
This commit is contained in:
parent
1e793295e8
commit
bb3f4964ec
@ -103,17 +103,15 @@ class GachaUI(UI):
|
|||||||
def _construct_bottom_navbar(self):
|
def _construct_bottom_navbar(self):
|
||||||
"""
|
"""
|
||||||
limited 4 options
|
limited 4 options
|
||||||
build.
|
event.
|
||||||
limited_build.
|
light.
|
||||||
orders.
|
heavy.
|
||||||
shop.
|
special.
|
||||||
retire.
|
|
||||||
|
|
||||||
regular 3 options
|
regular 3 options
|
||||||
build.
|
light.
|
||||||
orders.
|
heavy.
|
||||||
shop.
|
special.
|
||||||
retire.
|
|
||||||
"""
|
"""
|
||||||
construct_bottom_navbar = ButtonGrid(
|
construct_bottom_navbar = ButtonGrid(
|
||||||
origin=(262, 615), delta=(209, 0),
|
origin=(262, 615), delta=(209, 0),
|
||||||
|
@ -188,7 +188,8 @@ class Navbar:
|
|||||||
active, minimum, maximum = self.get_info(main=main)
|
active, minimum, maximum = self.get_info(main=main)
|
||||||
logger.info(f'Nav item active: {active} from range ({minimum}, {maximum})')
|
logger.info(f'Nav item active: {active} from range ({minimum}, {maximum})')
|
||||||
# Get None when receiving a pure black screenshot.
|
# Get None when receiving a pure black screenshot.
|
||||||
if minimum is None or maximum is None:
|
# Active is None could be because of slow animation
|
||||||
|
if active is None or minimum is None or maximum is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
index = minimum + left - 1 if left is not None else maximum - right + 1
|
index = minimum + left - 1 if left is not None else maximum - right + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user