feat(startscreen): add highscore table in start screen
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user