0

I want to create a control pad in pygame , I don't want to use a physical keyboard or joystick so I want to create control buttons on screen ,I am using rectangles as buttons but the problem I can't operate more than one button at the same time , is there a way to do it?

btn1 = pygame.Rect(200,170,110,110)
btn2 = pygame.Rect(50,430,110,110)
btn3 = pygame.Rect(200,2050,110,110)

btn = [btn1,btn2,btn3]

If the finger/mouse position is colliding with any button position ,I call a function

But when I want to operate two buttons at same time it don't work

I tried to store position of fingers in a list and remove it when I released the finger so I check if buttons position is colliding with elements in list But it doesn't work Help

0 Answers0