New answers tagged

0

Looking quickly at a hello world with pygame, I landed on this page. Here is the code they use: import pygame, sys from pygame.locals import * pygame.init() DISPLAYSURF = pygame.display.set_mode((400, 300)) pygame.display.set_caption('Hello World!') while True: # main game loop for event in pygame.event.get(): if event.type == QUIT: ...


-1

you can try this code import pygame vec = pygame.math.Vector2 class Text_box: def __init__(self, x, y, width, height, bg_colour=(124, 124, 124), active_colour=(255,255,255), text_size=24, text_colour=(0,0,0), border=0, border_colour=(0,0,0)): self.x = x self.y = y self.width = width self.height = height self.pos = vec(x, y) ...


Top 50 recent answers are included