PinmikPanik/gamedata/objects/menu/optionmenu.py

22 lines
648 B
Python
Raw Normal View History

2021-09-10 19:22:30 +02:00
import gamedata.objects.menu.menu as menu
class OptionMenu(menu.Menu):
def __init__(self,x,y,game,w=100,h=100):
super().__init__(x,y,game,w,h) # initialise l'objet de base avec les bons arguments
# Les dicos des boutons
def fnRetour(self,game):
game.scene = game.scenes.main
btnRetour= {"name":"Retour","function": fnRetour}
# Initialisation de la grille du menu
self.grid = [
[btnRetour]
]
self.create(self.grid,self.rect)
2021-09-16 08:34:40 +02:00
self.depth = -1
def draw(self):
self.game.window.blit(self.game.sprite_lib["gui/optionsbg.png"],[0,0])