So i'm trying to use collide point method on a button object that i've created but it doesn't have the collide point method and seems to only work on a rect. So is there a way to use this method but on an object.
this is the button class:
class Buttons():
def __init__(self,x,y,image,scale):
self.image=pygame.transform.scale(image, (200*scale, 100*scale))
self.rect = self.image.get_rect()
self.rect.topleft=(x,y)
self.clicked=False
AttributeError: 'Buttons' object has no attribute 'collidepoint'
However the error says attribute which i do not understand as i thought it was a method.