Answer the question
In order to leave comments, you need to log in
Why is the button not visible?
There is a code that launches the "Menu" class, it also contains an array with buttons, their location, color, etc.
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
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question