feat(startscreen): add comments

This commit is contained in:
Kevin Baumgartner
2026-05-07 20:39:17 +02:00
parent 9ddfa8ce74
commit 6d6fbc895b
+15
View File
@@ -2,6 +2,16 @@ import pygame
class Button: class Button:
def __init__(self, text, width, height, pos_x, pos_y, color, hover): def __init__(self, text, width, height, pos_x, pos_y, color, hover):
"""
:param text: Text inside the button.
:param width: Width of the button.
:param height: Height of the button.
:param pos_x: X position of the button on the screen.
:param pos_y: Y position of the button on the screen.
:param color: Color of the button on the screen.
:param hover: Color of the button on the screen when mouse is hover.
"""
self.text = text self.text = text
self.width = width self.width = width
self.height = height self.height = height
@@ -20,6 +30,11 @@ class Button:
self.clicked = False self.clicked = False
def draw(self, screen): def draw(self, screen):
"""
Draw the button on the screen.
:param screen: Screen object where button will be drawn.
:return: Return True when button was clicked.
"""
action = False action = False
# get current mous position # get current mous position