feat(startscreen): add highscore table in start screen

This commit is contained in:
Kevin Baumgartner
2026-05-08 17:37:30 +02:00
parent 80ad07c795
commit 7833d381a6
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -119,3 +119,7 @@ HUD_BAR_X = 150 # left startpoint for hp bars
HUD_Y_DOOR = 20
HUD_Y_ZOMBIE = 50
HUD_Y_ECTS = 85
# --- HIGHSCORE ---
HIGHSCORE_COLOR_FONT = (0, 0, 0)
HIGHSCORE_COLOR_TABLE = (150, 255, 0)
+6
View File
@@ -8,6 +8,7 @@ from src.settings import (
COLOR_STARTSCREEN_FONT_LABEL,
)
from src.text_input import TextInput
from src.highscore import Highscore
class Startscreen:
def __init__(self, screen):
@@ -42,6 +43,8 @@ class Startscreen:
20,
310)
self.highscore = Highscore()
def run(self):
# set background color
self.screen.fill(COLOR_STARTSCREEN_BACKGROUND)
@@ -70,6 +73,9 @@ class Startscreen:
label_input_error = self.font_label.render("Student not found. Please enter valid name/id.", True,
(255, 0, 0))
# draw highscore table
self.highscore.draw(self.screen, 560, 90)
# get all events
events = pygame.event.get()