"""
    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, mouse_pos):
        if self.rect.collidepoint(mouse_pos):
            if self.callback:
                self.callback()
            return True
        return False
    
    
#class DropDown():
#下拉选择框
    
