mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-08 01:45:54 +08:00
gradients...
This commit is contained in:
@@ -49,8 +49,8 @@ class Colors:
|
||||
BLACK_TRANSLUCENT = rl.Color(0, 0, 0, 166)
|
||||
WHITE_TRANSLUCENT = rl.Color(255, 255, 255, 200)
|
||||
BORDER_TRANSLUCENT = rl.Color(255, 255, 255, 75)
|
||||
EDGE_GRADIENT_START = rl.Color(0, 0, 0, 114)
|
||||
EDGE_GRADIENT_END = rl.BLANK
|
||||
HEADER_GRADIENT_START = rl.Color(0, 0, 0, 114)
|
||||
HEADER_GRADIENT_END = rl.BLANK
|
||||
|
||||
|
||||
UI_CONFIG = UIConfig()
|
||||
@@ -122,16 +122,8 @@ class HudRenderer(Widget):
|
||||
int(rect.y),
|
||||
int(rect.width),
|
||||
UI_CONFIG.header_height,
|
||||
COLORS.EDGE_GRADIENT_START,
|
||||
COLORS.EDGE_GRADIENT_END,
|
||||
)
|
||||
rl.draw_rectangle_gradient_v(
|
||||
int(rect.x),
|
||||
int(rect.y + rect.height - UI_CONFIG.header_height),
|
||||
int(rect.width),
|
||||
UI_CONFIG.header_height,
|
||||
COLORS.EDGE_GRADIENT_END,
|
||||
COLORS.EDGE_GRADIENT_START,
|
||||
COLORS.HEADER_GRADIENT_START,
|
||||
COLORS.HEADER_GRADIENT_END,
|
||||
)
|
||||
|
||||
if self.draw_set_speed and self.is_cruise_available and not ui_state.starpilot_toggles.get("hide_max_speed", False):
|
||||
|
||||
@@ -342,4 +342,4 @@ class StarPilotOnroadView(AugmentedRoadView):
|
||||
round(cx - sz.x / 2),
|
||||
round(self._content_rect.y + self._content_rect.height - sz.y - 5),
|
||||
)
|
||||
draw_text_with_shadow(font, road_name, text_pos, font_size, rl.Color(255, 255, 255, 180))
|
||||
draw_text_with_shadow(font, road_name, text_pos, font_size, rl.WHITE)
|
||||
|
||||
Reference in New Issue
Block a user