From 8ea9bc040c37c2732baad7c9812ef0f844ddf327 Mon Sep 17 00:00:00 2001 From: pushfoo <36696816+pushfoo@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:05:50 -0400 Subject: [PATCH 1/3] Use RGBOrA255 for UILabel.__init__'s caret_color --- arcade/gui/widgets/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arcade/gui/widgets/text.py b/arcade/gui/widgets/text.py index 0e904c0042..6397de2254 100644 --- a/arcade/gui/widgets/text.py +++ b/arcade/gui/widgets/text.py @@ -323,7 +323,7 @@ def __init__( font_size: float = 12, text_color: RGBOrA255 = (0, 0, 0, 255), multiline=False, - caret_color: RGB = (0, 0, 0), + caret_color: RGBOrA255 = (0, 0, 0, 255), size_hint=None, size_hint_min=None, size_hint_max=None, From e47a9e929b330769f04e6ca6a5c722cf7cc1c2bf Mon Sep 17 00:00:00 2001 From: pushfoo <36696816+pushfoo@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:07:16 -0400 Subject: [PATCH 2/3] Update docstring for caret_color --- arcade/gui/widgets/text.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arcade/gui/widgets/text.py b/arcade/gui/widgets/text.py index 6397de2254..e79eba34e3 100644 --- a/arcade/gui/widgets/text.py +++ b/arcade/gui/widgets/text.py @@ -298,7 +298,8 @@ class UIInputText(UIWidget): :py:class:`~arcade.gui.UITextWidget` ``multiline`` of True is the same thing as a :py:class:`~arcade.gui.UITextArea`. - :param caret_color: RGB color of the caret. + :param caret_color: An RGBA or RGB color for the caret with each + channel between 0 and 255, inclusive. :param size_hint: A tuple of floats between 0 and 1 defining the amount of space of the parent should be requested. :param size_hint_min: Minimum size hint width and height in pixel. From cb7e2de1178d1e37a374ccb372a1ca60e25d1f75 Mon Sep 17 00:00:00 2001 From: pushfoo <36696816+pushfoo@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:07:44 -0400 Subject: [PATCH 3/3] Remove unused RGB import --- arcade/gui/widgets/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arcade/gui/widgets/text.py b/arcade/gui/widgets/text.py index e79eba34e3..3fdc62f396 100644 --- a/arcade/gui/widgets/text.py +++ b/arcade/gui/widgets/text.py @@ -22,7 +22,7 @@ from arcade.gui.surface import Surface from arcade.gui.widgets import UIWidget, Rect from arcade.gui.widgets.layout import UIAnchorLayout -from arcade.types import RGBA255, Color, RGBOrA255, RGB +from arcade.types import RGBA255, Color, RGBOrA255 class UILabel(UIWidget):