import pygame import sys #Initialize Pygame pygame.init() #set up colours color_dark = (100, 100, 100) color_light = (50, 50, 50) #changed colour_light to a darker shade for better visibility #Create the display surface display = pygame.display.set_mode((800, 800)) display.fill((255, 255, 255)) #Create a rectangle pygame.draw.rect(display, color_dark, [590, 315, 80, 30]) #create text small_font = pygame.font.SysFont('corbel', 16) text = small_font.render('LOAD', True, color_light) #Main 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: #check if the mouse click is within the button area print("Button clicked!") #Placeholder for button click action #Blit the text onto the display surface display.blit(text, (600,320)) #Update the display pygame.display.update()