Use colors enum properly in Ui class
This commit is contained in:
parent
9ddcec6d73
commit
7f624fe56e
20
src/ui/Ui.py
20
src/ui/Ui.py
@ -22,29 +22,29 @@ class Ui():
|
|||||||
self.font = font
|
self.font = font
|
||||||
|
|
||||||
self.timer = timer
|
self.timer = timer
|
||||||
self.timerTextView = UiText(pygame.Rect(0, 0, leftUiWidth, self.barHeight), textColor=Colors.WHITE,
|
self.timerTextView = UiText(pygame.Rect(0, 0, leftUiWidth, self.barHeight), text="",
|
||||||
backgroundColor=Colors.GRAY)
|
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.healthBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight))
|
||||||
self.hungerBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight), initialFilledPercent=0,
|
self.hungerBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight), initialFilledPercent=0,
|
||||||
filledBarColor=Colors.YELLOW)
|
filledBarColor=Colors.YELLOW.value)
|
||||||
self.staminaBar = UiBar(pygame.Rect(0, 0, rightUiWidth, self.barHeight), filledBarColor=Colors.GREEN)
|
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,
|
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",
|
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",
|
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",
|
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",
|
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,
|
self.console = UiConsole(pygame.Rect(0, 0, leftUiWidth,
|
||||||
screenHeight - self.timerTextView.rect.h - self.isDayTextView.rect.h))
|
screenHeight - self.timerTextView.rect.h - self.isDayTextView.rect.h))
|
||||||
|
Loading…
Reference in New Issue
Block a user