2023-06-14 12:15:05 +00:00
|
|
|
import pygame
|
|
|
|
|
|
|
|
pygame.init()
|
|
|
|
|
2023-11-29 10:53:30 +00:00
|
|
|
font = pygame.font.Font(None, 30)
|
2023-06-14 12:15:05 +00:00
|
|
|
|
2023-11-29 10:53:30 +00:00
|
|
|
|
|
|
|
def debug(info, y=10, x=10):
|
2023-06-14 12:15:05 +00:00
|
|
|
display_surface = pygame.display.get_surface()
|
|
|
|
debug_surf = font.render(str(info), True, 'White')
|
2023-11-29 10:53:30 +00:00
|
|
|
debug_rect = debug_surf.get_rect(topleft=(x, y))
|
2023-06-14 12:15:05 +00:00
|
|
|
pygame.draw.rect(display_surface, 'Black', debug_rect)
|
|
|
|
display_surface.blit(debug_surf, debug_rect)
|