import pygame
из pygame.locals import *
из sys import exit
pygame.init ()
SCREEN_size (1000 560)
screen = pygame.display.set_mode (SCREEN_size, 0,32)
font = pygame.font.SysFont ("algerian", 18)
font_height = font. get_lineSize ()
eventtext = []
pygame.display.update ()
, в то время как True:
event= pygame.event.wait()
event.text.append(str(event))
eventtext=eventtext[-SCREEN_size[1]/font_height:]
if event.type==QUIT:
exit()
y=SCREEN_size[1]-font_height
for text in reversed(eventtext):
screen.blit(font.render(text,True,(0,0,0),(0,y))
pygame.display.update ( )