diff --git a/project/data/font/MilkyNice.otf b/project/data/font/MilkyNice.otf new file mode 100644 index 0000000..a781d36 Binary files /dev/null and b/project/data/font/MilkyNice.otf differ diff --git a/project/main.py b/project/main.py index ad255f6..5e88719 100644 --- a/project/main.py +++ b/project/main.py @@ -13,7 +13,7 @@ from sprite.StaticSprite import StaticSprite from ui_elements.TextLabel import TextLabel -what_to_run = 'physics' +what_to_run = 'textlabel' if what_to_run == 'level': csv_parse_test = LevelManager('data/levels') @@ -64,7 +64,7 @@ elif what_to_run == 'textlabel': pygame.display.set_caption("PM GAME") clock = pygame.time.Clock() - test = TextLabel("Hallo", 100, 100, 50, Font('data/font/MilkyNice.otf')) + test = TextLabel("Das ist ein Text", 100, 100, 50, Font('data/font/MilkyNice.otf', 50)) while True: clock.tick(5) diff --git a/project/ui_elements/TextLabel.py b/project/ui_elements/TextLabel.py index 8000788..ae93bec 100644 --- a/project/ui_elements/TextLabel.py +++ b/project/ui_elements/TextLabel.py @@ -6,7 +6,6 @@ from sprite.PositionScale import PositionScale class TextLabel: - # pygame.font.Font('data/font/arcade.TTF') def __init__(self, text: str, x_position: float, y_position: float, font_size: float, font: Font, alignment: str = "left"): self.text = text