WMICraft/helpers.py

5 lines
190 B
Python
Raw Permalink Normal View History

2022-03-08 12:11:22 +01:00
def draw_text(text, font, color, surface, x, y):
textobj = font.render(text, 1, color)
textrect = textobj.get_rect()
textrect.topleft = (x, y)
surface.blit(textobj, textrect)