From 9ddcec6d7341a3a7ca9cc601c8dc6a2375567f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sun, 5 Apr 2020 22:15:23 +0200 Subject: [PATCH] Add fields for params in __init__ in UiText --- src/ui/UiText.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/UiText.py b/src/ui/UiText.py index 37602d2..babd7ae 100644 --- a/src/ui/UiText.py +++ b/src/ui/UiText.py @@ -7,10 +7,14 @@ from src.ui.UiElement import UiElement class UiText(UiElement): def __init__(self, rect: pygame.Rect, text: str, font: pygame.font.Font = None, - textColor: Tuple[int, int, int] = (0, 0, 0), antialias: bool = False, - backgroundColor: Tuple[int, int, int] = None): + textColor=(0, 0, 0), antialias: bool = False, + backgroundColor=None): super().__init__(rect) + self.backgroundColor = backgroundColor + self.antialias = antialias + self.textColor = textColor + self.text = text if font is None: font = pygame.font.Font(None, 12) self.font = font