import pygame import displayControler as dCon import Colors class Ui: def __init__(self,screen): self.screen=screen self.font='freesansbold.ttf' #Feel free to change it :D self.font_size=int(32) def render_text(self,string_to_print): font=pygame.font.Font(self.font,self.font_size) text=font.render(string_to_print,True,Colors.BLACK,Colors.WHITE) textRect=text.get_rect() textRect.center=(dCon.getScreenWidth() // 2,dCon.getScreenHeihgt() // 2) self.screen.blit(text,textRect)