added 3 surfaces with auto switching

This commit is contained in:
2023-02-19 22:16:40 -05:00
parent e7bade5a3f
commit de6d39be4d
10 changed files with 115 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import pygame.font
import os
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
class RegularText:
def __init__(self, text):
font = pygame.font.Font(SCRIPT_DIR + '/../resources/Tuffy_Bold.ttf', 32)
self.surface = font.render(text, True, (0, 0, 0))
self.rect = self.surface.get_rect()