Answers for "how to get a mouse press not hold in pygame"

0

how to get a mouse press not hold in pygame

class Button(object):
    def __init__(self,x,y,width,height,color):
        self.rect = pygame.Rect(x,y,width,height)
        self.image=pygame.draw.rect(screen, color,(self.rect),)
        self.x=x
        self.y=y
        self.width=width
        self.height=height

    def check(self):
        return self.rect.collidepoint(pygame.mouse.get_pos())
Posted by: Guest on July-29-2020

Python Answers by Framework

Browse Popular Code Answers by Language