Reformat file Ui.py
This commit is contained in:
parent
4985794b44
commit
932073d72a
29
src/ui/Ui.py
29
src/ui/Ui.py
@ -26,25 +26,36 @@ class Ui():
|
|||||||
self.timerTextView = UiText(pygame.Rect(0, 0, leftUiWidth, self.barHeight), font=self.font,
|
self.timerTextView = UiText(pygame.Rect(0, 0, leftUiWidth, self.barHeight), font=self.font,
|
||||||
text=timer.getPrettyTime(), textColor=Colors.WHITE.value,
|
text=timer.getPrettyTime(), textColor=Colors.WHITE.value,
|
||||||
backgroundColor=Colors.GRAY.value)
|
backgroundColor=Colors.GRAY.value)
|
||||||
self.isDayTextView = UiText(pygame.Rect(0, self.timerTextView.rect.y + self.barHeight, leftUiWidth, self.barHeight), text="Day",
|
self.isDayTextView = UiText(
|
||||||
|
pygame.Rect(0, self.timerTextView.rect.y + self.barHeight, leftUiWidth, self.barHeight), text="Day",
|
||||||
font=self.font, backgroundColor=Colors.GRAY.value, textColor=Colors.WHITE.value)
|
font=self.font, backgroundColor=Colors.GRAY.value, textColor=Colors.WHITE.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.value)
|
font=self.font, textColor=Colors.WHITE.value)
|
||||||
self.healthBar = UiBar(pygame.Rect(0, self.healthTextView.rect.y + self.barHeight, rightUiWidth, self.barHeight))
|
self.healthBar = UiBar(
|
||||||
|
pygame.Rect(0, self.healthTextView.rect.y + self.barHeight, rightUiWidth, self.barHeight))
|
||||||
|
|
||||||
self.hungerTextView = UiText(pygame.Rect(0, self.healthBar.rect.y + self.barHeight, rightUiWidth, self.barHeight),
|
self.hungerTextView = UiText(
|
||||||
|
pygame.Rect(0, self.healthBar.rect.y + self.barHeight, rightUiWidth, self.barHeight),
|
||||||
text="Hunger", font=self.font, textColor=Colors.WHITE.value)
|
text="Hunger", font=self.font, textColor=Colors.WHITE.value)
|
||||||
self.hungerBar = UiBar(pygame.Rect(0, self.hungerTextView.rect.y + self.barHeight, rightUiWidth, self.barHeight), initialFilledPercent=0,
|
self.hungerBar = UiBar(
|
||||||
|
pygame.Rect(0, self.hungerTextView.rect.y + self.barHeight, rightUiWidth, self.barHeight),
|
||||||
|
initialFilledPercent=0,
|
||||||
filledBarColor=Colors.YELLOW.value)
|
filledBarColor=Colors.YELLOW.value)
|
||||||
|
|
||||||
self.staminaTextView = UiText(pygame.Rect(0, self.hungerBar.rect.y + self.barHeight, rightUiWidth, self.barHeight), text="Stamina",
|
self.staminaTextView = UiText(
|
||||||
|
pygame.Rect(0, self.hungerBar.rect.y + self.barHeight, rightUiWidth, self.barHeight), text="Stamina",
|
||||||
font=self.font, textColor=Colors.WHITE.value)
|
font=self.font, textColor=Colors.WHITE.value)
|
||||||
self.staminaBar = UiBar(pygame.Rect(0, self.staminaTextView.rect.y + self.barHeight, rightUiWidth, self.barHeight), filledBarColor=Colors.GREEN.value)
|
self.staminaBar = UiBar(
|
||||||
|
pygame.Rect(0, self.staminaTextView.rect.y + self.barHeight, rightUiWidth, self.barHeight),
|
||||||
|
filledBarColor=Colors.GREEN.value)
|
||||||
|
|
||||||
self.thirstTextView = UiText(pygame.Rect(0, self.staminaBar.rect.y + self.barHeight, rightUiWidth, self.barHeight), text="Thirst",
|
self.thirstTextView = UiText(
|
||||||
|
pygame.Rect(0, self.staminaBar.rect.y + self.barHeight, rightUiWidth, self.barHeight), text="Thirst",
|
||||||
font=self.font, textColor=Colors.WHITE.value)
|
font=self.font, textColor=Colors.WHITE.value)
|
||||||
self.thirstBar = UiBar(pygame.Rect(0, self.thirstTextView.rect.y + self.barHeight, rightUiWidth, self.barHeight), initialFilledPercent=0,
|
self.thirstBar = UiBar(
|
||||||
|
pygame.Rect(0, self.thirstTextView.rect.y + self.barHeight, rightUiWidth, self.barHeight),
|
||||||
|
initialFilledPercent=0,
|
||||||
filledBarColor=Colors.BLUE.value)
|
filledBarColor=Colors.BLUE.value)
|
||||||
|
|
||||||
self.console = UiConsole(pygame.Rect(0, self.timerTextView.rect.h + self.isDayTextView.rect.h, leftUiWidth,
|
self.console = UiConsole(pygame.Rect(0, self.timerTextView.rect.h + self.isDayTextView.rect.h, leftUiWidth,
|
||||||
@ -61,8 +72,6 @@ class Ui():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Colors(Enum):
|
class Colors(Enum):
|
||||||
RED = (255, 0, 0)
|
RED = (255, 0, 0)
|
||||||
GREEN = (0, 255, 0)
|
GREEN = (0, 255, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user