From b629a4a77e7361cd1d430b0d63eb893e8ccd55d5 Mon Sep 17 00:00:00 2001 From: Garrett Bates Date: Mon, 11 Nov 2024 11:06:19 -0700 Subject: [PATCH] Fixed erroneous use of variable 'relative_rect' in UILabel.__init__ which prevented using a coordinate to position a label. --- pygame_gui/elements/ui_label.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygame_gui/elements/ui_label.py b/pygame_gui/elements/ui_label.py index 245646b3..87a78f7e 100644 --- a/pygame_gui/elements/ui_label.py +++ b/pygame_gui/elements/ui_label.py @@ -64,7 +64,7 @@ def __init__(self, relative_rect: Union[RectLike, Coordinate], object_id=object_id, element_id=['label']) - self.dynamic_dimensions_orig_top_left = relative_rect.topleft + self.dynamic_dimensions_orig_top_left = rel_rect.topleft self.text = text self.text_kwargs = {}