def __init__(
        self, name, func, position, fontPath, fontSize, text, fontColor, fontBGColor, menu=None, neighbors=None
    ):

        MenuButton.__init__(self, position, 1, 1, name, menu, neighbors)
        Text.__init__(self, position, fontPath, fontSize, text, fontColor, fontBGColor)

        self._defaultColor = self._fontColor
        self._highlightColor = pygame.Color(255, 255, 255)
        self._selectColor = pygame.Color(255, 255, 0)

        self._function = func
Exemplo n.º 2
0
    def __init__(
        self,
        name,
        targetMenuName,
        position,
        fontPath,
        fontSize,
        text,
        fontColor,
        fontBGColor,
        menu=None,
        neighbors=None,
    ):
        """
        Constructor
        """
        MenuButton.__init__(self, position, 1, 1, name, menu, neighbors)
        Text.__init__(self, position, fontPath, fontSize, text, fontColor, fontBGColor)

        self._defaultColor = self._fontColor
        self._highlightColor = pygame.Color(255, 255, 255)
        self._selectColor = pygame.Color(255, 255, 0)
        self._targetMenuName = targetMenuName