I want to remove an image but i don't know really how to do it. I think we have to create a function ? import pygame pygame.init() pygame.display.set_caption("Képomon") screen = pygame.display.set_mode((284*2,472*2)) BattleStartImage = pygame.image.load('assets/BattleStart.png') buttonRondAImage = pygame.image.load('assets/buttonRondA.png') class Button(): def __init__(self, x, y, image, scale): width = image.get_width() height = image.get_height() self.image = pygame.transform.scale(image, (int(width * scale), int(height * scale))) self.rect = self.image.get_rect() self.rect.topleft = (x,y) self.clicked = False def draw(self): action = False #get mouse position pos = pygame.mouse.get_pos() #check mouseover and clicked conditions if self.rect.collidepoint(pos): if pygame.mouse.get_pressed()[0]==1 and self.clicked == False: self.cl
A site where you can share knowledge