#Buttons import pygame, sys, random from pygame.locals import * pygame.init() DISPLAYWINDOWSIZE = pygame.display.set_mode((800,800)) pygame.display.set_caption("Test") DISPLAYWINDOWSIZE.fill((255,255,255)) color_dark = (100, 100, 100) color_light = (50, 50, 50) pygame.draw.rect(DISPLAYWINDOWSIZE, color_dark , [343, 290, 82, 30]) smallfont = pygame.font.SysFont('Corbel', 18) text = smallfont.render('Click Me', True , color_light) #Event and button output while True : for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() mouse = pygame.mouse.get_pos() if event.type == pygame.MOUSEBUTTONDOWN: if 343 <= mouse[0] <= 445 and 290 <= mouse[1] <= 330: print("Loser") DISPLAYWINDOWSIZE.blit(text , (350 , 300)) pygame.display.update()