rect1 = pygame.draw.rect(display, (125,125,125),(200,300,310,380))
if rect1.collidepoint(mouse_pos):
#dosomething
This condition isn't working even when I click on the rect ,but if I use "<" or "=" or ">" sign instead of "collidepoint" it works
mouse_pos is event.pos,when I click on rect1 ,mouse_pos registers/becomes the coordinate of rect1
What is the problem , why it is not working?