diff options
author | TinWoodman92 <chrhodgden@gmail.com> | 2023-12-16 06:18:44 -0600 |
---|---|---|
committer | TinWoodman92 <chrhodgden@gmail.com> | 2023-12-16 06:18:44 -0600 |
commit | 158b36e51c8c2925d6c8af6e08380369d019378e (patch) | |
tree | f91fadecf85e982714927eb6ab451c9173e37de0 /play.py |
Initial commit
Diffstat (limited to 'play.py')
-rw-r--r-- | play.py | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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) + |