def __init__(self, position, text_font): Sprite.__init__(self, position) self.add_image("clicked", "other/gui.png", (16, 0, 16, 16)) self.add_image("default", "other/gui.png", (0, 0, 16, 16)) self.rect.topleft = position self.clicked = False self.hover_text = HoverText(position, text_font) self.set_hover_text("")
def __init__(self, position, font): Sprite.__init__(self, position) self.font = font template = util.get_sheet("other/gui.png").get_image((32, 0, 12, 12)) self.background = util.GUIBackground(template) self.image = None