buttons = [
(120, 140, u'Play', (250,250,30), (250,30,250), 0),
(130, 210, u'Quit', (250,250,30), (250,30,250), 1)]
game = Menu(buttons )
game.menu()
class Menu:
def __init__(self, buttons = [res_x, rex_y, u'Button', (0,128,128), (1,333,123)]):
self.buttons = buttons
def render(self, powerhnost, font, numButton):
for i in self.buttons:
if numButton == i[5]:
powerhnost.blit(font.render(i[2], 1, i[4]), (i[0], i[1]))
else:
powerhnost.blit(font.render(i[2], 1, i[3]), (i[0], i[1]))
def menu(self):
done = True
font_menu = font.Font('fonts/asinastra.otf', 33)
button = 0