import pygame
import random
import math
pygame.init()
win = pygame.display.set_mode((500,500))
pygame.display.set_caption("")
user_text = ""
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.KEYDOWN:
user_text += event.unicode
win.fill((0,0,0))
font = pygame.font.SysFont('Calibri', 25, True, False)
if len(user_text) > 9:
user_text = ""
text = font.render(user_text, True, (255,255,255))
win.blit(text, [150, 0])
text = pygame.transform.rotate(text, 180)
win.blit(text, [150, 100])
pygame.display.update()
pygame.quit()
|