From 61ddaae9a4bce967e6c52da69681bec8ae8856f2 Mon Sep 17 00:00:00 2001 From: Yan Wittmann Date: Sat, 25 Mar 2023 16:18:44 +0100 Subject: [PATCH 1/2] Updated pygame version to 2.3.0 --- project/ui_elements/TextLabel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/ui_elements/TextLabel.py b/project/ui_elements/TextLabel.py index ae93bec..98b90e4 100644 --- a/project/ui_elements/TextLabel.py +++ b/project/ui_elements/TextLabel.py @@ -1,5 +1,5 @@ import pygame -from pygame.examples.textinput import Screen +from pygame import Surface from pygame.font import Font from sprite.PositionScale import PositionScale @@ -18,7 +18,7 @@ class TextLabel: self.font = font self.position_scale = PositionScale() - def draw(self, screen: Screen, screen_transform: PositionScale): + def draw(self, screen: Surface, screen_transform: PositionScale): rendered_font = self.font.render(str(self.text), True, (255, 255, 255)) self.current_width = rendered_font.get_width() self.current_height = rendered_font.get_height() From 185c5c4b37cd26c012185733ae51d967662c06a6 Mon Sep 17 00:00:00 2001 From: Yan Wittmann Date: Sat, 25 Mar 2023 16:28:54 +0100 Subject: [PATCH 2/2] Added requirements file --- project/main.py | 3 +-- project/requirements.txt | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 project/requirements.txt diff --git a/project/main.py b/project/main.py index 5e88719..724c8ba 100644 --- a/project/main.py +++ b/project/main.py @@ -1,7 +1,7 @@ import random import pygame -from pygame.font import Font +from pygame.font import Font from level.LevelManager import LevelManager from sprite.DynamicSprite import DynamicSprite @@ -12,7 +12,6 @@ from sprite.Sprite import Sprite from sprite.StaticSprite import StaticSprite from ui_elements.TextLabel import TextLabel - what_to_run = 'textlabel' if what_to_run == 'level': diff --git a/project/requirements.txt b/project/requirements.txt new file mode 100644 index 0000000..49f851d --- /dev/null +++ b/project/requirements.txt @@ -0,0 +1 @@ +pygame==2.3.0