From 6d6fbc895b9df5117f559dcabd73733242d975e3 Mon Sep 17 00:00:00 2001 From: Kevin Baumgartner Date: Thu, 7 May 2026 20:39:17 +0200 Subject: [PATCH] feat(startscreen): add comments --- src/button.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/button.py b/src/button.py index fc2ef96..73da2d1 100644 --- a/src/button.py +++ b/src/button.py @@ -2,6 +2,16 @@ import pygame class Button: 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.width = width self.height = height @@ -20,6 +30,11 @@ class Button: self.clicked = False 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 # get current mous position