You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
725 B

from charaters.personnage import Personnage
from graphics.colors import Colors
from graphics.layer.menu import Menu
from graphics.writer import *
from getkey import keys
from time import sleep
game = Screen()
menu = Menu(game, ["Inventaire", "Teset"])
def key_handler(key):
print(key)
if key == keys.RIGHT and menu.current < len(menu.buttons)-1:
main.menu.current += 1
elif key == keys.LEFT and menu.current > 0:
menu.current -= 1
print(menu.current)
def draw():
game.set_layer("menu", menu.draw_layer())
if __name__ == "__main__":
from listener import key_listener
#key_listener.start()
while True:
draw()
game.draw()
print("t")
sleep(1)