Add: is_map_loading()

This commit is contained in:
LmeSzinc 2023-10-03 02:25:22 +08:00
parent 4831a9d71e
commit d1abb19982
5 changed files with 26 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -13,3 +13,13 @@ DUNGEON_COMBAT_INTERACT = ButtonWrapper(
button=(750, 411, 997, 448),
),
)
MAP_LOADING = ButtonWrapper(
name='MAP_LOADING',
share=Button(
file='./assets/share/combat/interact/MAP_LOADING.png',
area=(644, 367, 662, 389),
search=(639, 347, 667, 394),
color=(159, 141, 149),
button=(644, 367, 662, 389),
),
)

View File

@ -1,5 +1,7 @@
from module.base.utils import color_similar, get_color
from tasks.base.ui import UI
from tasks.combat.assets.assets_combat_interact import DUNGEON_COMBAT_INTERACT
from tasks.combat.assets.assets_combat_interact import DUNGEON_COMBAT_INTERACT, MAP_LOADING
from tasks.map.assets.assets_map_control import A_BUTTON
class CombatInteract(UI):
@ -12,3 +14,15 @@ class CombatInteract(UI):
return True
return False
def is_map_loading(self):
if self.appear(MAP_LOADING, similarity=0.75):
return True
return False
def is_map_loading_black(self):
color = get_color(self.device.image, A_BUTTON.area)
if color_similar(color, (0, 0, 0)):
return True
return False

View File

@ -10,6 +10,6 @@ ROGUE_REPORT = ButtonWrapper(
area=(1198, 19, 1223, 42),
search=(1178, 0, 1243, 62),
color=(203, 165, 119),
button=(382, 645, 894, 700),
button=(1198, 19, 1223, 42),
),
)