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