From 158b36e51c8c2925d6c8af6e08380369d019378e Mon Sep 17 00:00:00 2001 From: TinWoodman92 <chrhodgden@gmail.com> Date: Sat, 16 Dec 2023 06:18:44 -0600 Subject: Initial commit --- play.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 play.py (limited to 'play.py') diff --git a/play.py b/play.py new file mode 100644 index 0000000..d0b27b8 --- /dev/null +++ b/play.py @@ -0,0 +1,22 @@ +from load_nav import * + +menu_tree = [None, None, mm_menu] + +while True: + + # if next item is the previous item, remove next item and current item and load the previous item + if menu_tree[-1] == menu_tree[-3]: + menu_tree.pop(-1) + menu_tree.pop(-1) + + if menu_tree[-1] == None: + # quit program + break + elif type(menu_tree[-1]) is Launcher: + menu_tree[-1].launch() + menu_tree.pop(-1) + elif type(menu_tree[-1]) is Menu: + menu_tree[-1].open(prev_menu=menu_tree[-2]) + menu_tree[-1].clear() + menu_tree.append(menu_tree[-1].next_item) + -- cgit v1.2.3