From 7f624fe56ef44163a123837b97792e00346977b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sun, 5 Apr 2020 22:16:09 +0200 Subject: [PATCH] Use colors enum properly in Ui class --- src/ui/Ui.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ui/Ui.py b/src/ui/Ui.py index c2ed9f3..a3e7bc4 100644 --- a/src/ui/Ui.py +++ b/src/ui/Ui.py @@ -22,29 +22,29 @@ class Ui(): self.font = font self.timer = timer - self.timerTextView = UiText(pygame.Rect(0, 0, leftUiWidth, self.barHeight), textColor=Colors.WHITE, - backgroundColor=Colors.GRAY) + self.timerTextView = UiText(pygame.Rect(0, 0, leftUiWidth, self.barHeight), text="", + textColor=Colors.WHITE.value, backgroundColor=Colors.GRAY.value) - self.isDayTextView = UiText(pygame.Rect(0, 0, leftUiWidth, self.barHeight), font=self.font) + self.isDayTextView = UiText(pygame.Rect(0, 0, leftUiWidth, self.barHeight), text="", font=self.font) self.healthBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight)) self.hungerBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight), initialFilledPercent=0, - filledBarColor=Colors.YELLOW) - self.staminaBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight), filledBarColor=Colors.GREEN) + filledBarColor=Colors.YELLOW.value) + self.staminaBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight), filledBarColor=Colors.GREEN.value) self.thirstBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight), initialFilledPercent=0, - filledBarColor=Colors.BLUE) + filledBarColor=Colors.BLUE.value) self.healthTextView = UiText(pygame.Rect(0, 0, rightUiWidth, self.barHeight), text="Health points", - font=self.font, textColor=Colors.WHITE) + font=self.font, textColor=Colors.WHITE.value) self.hungerTextView = UiText(pygame.Rect(0, 0, rightUiWidth, self.barHeight), text="Hunger", - font=self.font, textColor=Colors.WHITE) + font=self.font, textColor=Colors.WHITE.value) self.staminaTextView = UiText(pygame.Rect(0, 0, rightUiWidth, self.barHeight), text="Stamina", - font=self.font, textColor=Colors.WHITE) + font=self.font, textColor=Colors.WHITE.value) self.thirstTextView = UiText(pygame.Rect(0, 0, rightUiWidth, self.barHeight), text="Thirst", - font=self.font, textColor=Colors.WHITE) + font=self.font, textColor=Colors.WHITE.value) self.console = UiConsole(pygame.Rect(0, 0, leftUiWidth, screenHeight - self.timerTextView.rect.h - self.isDayTextView.rect.h))