2024-12-13 13:49
import pygame
pygame.init()
left_button = pygame.Rect(50, 200, 50, 50) # (x, y, width, height)
right_button = pygame.Rect(150, 200, 50, 50)
jump_button = pygame.Rect(250, 200, 50, 50)
font = pygame.font.Font(None, 36)
black = (0, 0, 0)
screen = pygame.display.set_mode((400, 400))
screen.blit(font.render("←", True, black), (left_button.x + 20, left_button.y + 10))
screen.blit(font.render("→", True, black), (right_button.x + 20, right_button.y + 10))
تكملة تحت