1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 14:27:00 +08:00

Fix: storage hp bar button grid and red color

This commit is contained in:
sui-feng-cb
2025-09-07 15:15:26 +08:00
parent e9957200e5
commit e43296ee0e
2 changed files with 10 additions and 8 deletions

View File

@@ -4,9 +4,6 @@ from module.base.decorator import Config
from module.config.utils import to_list
from module.logger import logger
# Color that shows on HP bar.
COLOR_HP_GREEN = (156, 235, 57)
COLOR_HP_RED = (99, 44, 24)
SCOUT_POSITION = [
(403, 421),
(625, 369),
@@ -19,6 +16,9 @@ class HPBalancer(ModuleBase):
fleet_show_index = 1
_hp = {}
_hp_has_ship = {}
# Color that shows on HP bar.
COLOR_HP_GREEN = (156, 235, 57)
COLOR_HP_RED = (99, 44, 24)
@property
def hp(self):
@@ -62,8 +62,8 @@ class HPBalancer(ModuleBase):
float: HP.
"""
data = max(
color_bar_percentage(self.device.image, area=area, prev_color=COLOR_HP_RED),
color_bar_percentage(self.device.image, area=area, prev_color=COLOR_HP_GREEN)
color_bar_percentage(self.device.image, area=area, prev_color=self.COLOR_HP_RED),
color_bar_percentage(self.device.image, area=area, prev_color=self.COLOR_HP_GREEN)
)
return data