From e03606e63497b249f401d7a31de1107a7948a963 Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Mon, 19 May 2025 17:00:29 +0100 Subject: [PATCH] text color --- system/ui/lib/button.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/ui/lib/button.py b/system/ui/lib/button.py index ab2f8e6f8e..38ac7a82c4 100644 --- a/system/ui/lib/button.py +++ b/system/ui/lib/button.py @@ -21,6 +21,7 @@ ICON_PADDING = 15 DEFAULT_BUTTON_FONT_SIZE = 60 BUTTON_ENABLED_TEXT_COLOR = rl.Color(228, 228, 228, 255) BUTTON_DISABLED_TEXT_COLOR = rl.Color(228, 228, 228, 51) +ACTION_BUTTON_TEXT_COLOR = rl.Color(0, 0, 0, 255) BUTTON_BACKGROUND_COLORS = { @@ -50,7 +51,7 @@ def gui_button( border_radius: int = 10, # Corner rounding in pixels text_alignment: TextAlignment = TextAlignment.CENTER, text_padding: int = 20, # Padding for left/right alignment - icon = None, + icon=None, ) -> int: result = 0 @@ -108,7 +109,7 @@ def gui_button( # Draw the button text if any if text: - text_color = BUTTON_ENABLED_TEXT_COLOR if is_enabled else BUTTON_DISABLED_TEXT_COLOR + text_color = ACTION_BUTTON_TEXT_COLOR if button_style == ButtonStyle.ACTION else BUTTON_ENABLED_TEXT_COLOR if is_enabled else BUTTON_DISABLED_TEXT_COLOR rl.draw_text_ex(font, text, text_pos, font_size, 0, text_color) return result