"""
    SafariChess_Classes.py
    Classes for button and keyboard events
"""

class Button:
    def __init__(self, image, position, callback=None):
        self.image = image
        self.rect = image.get_rect(topleft=position)
        self.callback = callback
    
    def on_click(self, event):
        if event.button == 1:
            if self.rect.collidepoint(event.pos):
                self.callback(self)
    
#class DropDown():
#下拉选择框
    
