Browse Source

ajout boutton

master
Kalyax 2 years ago
parent
commit
5b5802d66b
  1. 7
      graphics/layers.py

7
graphics/layers.py

@ -11,7 +11,7 @@ class GUI(Layer):
def __init__(self, z_index):
super().__init__(z_index, "gui")
self.__current = 0
self.__buttons = ["Attaquer", "Inventaire"]
self.__buttons = ["Attaquer", "Inventaire", "Quitter"]
self.__inventaire = False
self.handle_keys = False
@ -65,10 +65,12 @@ class GUI(Layer):
elif self.__current == 1:
self.__inventaire = True
self.__buttons = ["Retour", "Utiliser une potion"]
elif self.__current == 2:
raise KeyboardInterrupt
else:
if self.__current == 0:
self.__inventaire = False
self.__buttons = ["Attaquer", "Inventaire"]
self.__buttons = ["Attaquer", "Inventaire", "Quitter"]
elif self.__current == 1:
perso = Screen.instance.game.personnage
inv = perso.inventaire
@ -76,7 +78,6 @@ class GUI(Layer):
perso.change_pdv(-10)
inv.remove(inv.pop_potion())
class StartPopUp(Layer):
"""Calque du menu de lancement"""
def __init__(self, z_index):

Loading…
Cancel
Save