From af1b44c7be0e287fa24f9fae469bea0d2935c301 Mon Sep 17 00:00:00 2001 From: Kevin Baumgartner Date: Thu, 7 May 2026 20:11:13 +0200 Subject: [PATCH] feat(startscreen): add start and quit buttons on startscreen --- src/startscreen.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/startscreen.py b/src/startscreen.py index 60c51ff..9215d6a 100644 --- a/src/startscreen.py +++ b/src/startscreen.py @@ -7,7 +7,25 @@ class Startscreen: self.font_title = pygame.font.SysFont("Arial", 36) self.font_label = pygame.font.SysFont("Arial", 20) + self.button_color = (0, 255, 0) + self.button_hover_color = (200, 255, 0) + # todo buttons must be initialized here + self.button_start = Button("[ENTER] Immatrikulieren", + 500, + 70, + 20, + 60, + self.button_color, + self.button_hover_color) + + self.button_quit = Button("[ESC] Exmatrikulieren", + 500, + 70, + 20, + 150, + self.button_color, + self.button_hover_color) def run(self): # set background color @@ -19,6 +37,9 @@ class Startscreen: message = self.font_label.render("Welcome to FH - Study with purpose", True, (0, 255, 255)) # todo buttons must be drawn here + button_start_pressed = self.button_start.draw(self.screen) + button_start_pressed = self.button_quit.draw(self.screen) + # todo check button events/click # check key down events - exit/quit