import pygame import sys # Initialize pygame pygame.init() # Create the display window display = pygame.display.set_mode((800, 800)) color_dark = (100, 100, 100) color_light = (200, 200, 200) # Try to load the 'Corbel' font, and fall back to default if it fails try: smallfont = pygame.font.SysFont('Corbel', 16) except: smallfont = pygame.font.SysFont(None, 16) # Default font if Corbel is not available # Render the text text = smallfont.render('LOAD', True, color_light) # Draw a button pygame.draw.rect(display, color_dark, [590, 315, 80, 30]) display.blit(text, (600, 320)) # Main game loop while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() mouse = pygame.mouse.get_pos() if event.type == pygame.MOUSEBUTTONDOWN: if 590 <= mouse[0] <= 670 and 315 <= mouse[1] <= 345: print("yea") pygame.display.update()