- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.py
More file actions
Latest commit
10 lines (9 loc) · 363 Bytes
/
Copy pathdebug.py
File metadata and controls
10 lines (9 loc) · 363 Bytes
1
2
3
4
5
6
7
8
9
10
importpygame
pygame.init()
font=pygame.font.Font(None, 30)
defdebug(info, y=10, x=10):
display_surface=pygame.display.get_surface()
debug_surf=font.render(str(info), True, 'White')
debug_rect=debug_surf.get_rect(topleft= (x,y))
pygame.draw.rect(display_surface, 'Black', debug_rect)
display_surface.blit(debug_surf, debug_rect)