import pygame as py class Button(): def __init__(self, x, y, image): self.image = image self.rect = self.image.get_rect() self.rect.topleft = (x, y) def draw(self, surface): #get mosue pos pos = pg.mou