I have lots of rects and each one has its own function when clicking on it.
Some of these rects are overlap sometimes. When I click somewhere, I want to execute just the above rect function (not all rects in that position).
Thanks
Give a name/var to each rectangle, then use a for loop and break once the rect is the desired one.
How click affects just on above rect in pygame?