This commit is contained in:
chrys 2019-02-04 22:32:48 +01:00
parent 6c7a197f26
commit d0a310a31a

View File

@ -23,14 +23,18 @@ class vmenuManager():
def shutdown(self):
pass
def setCurrMenu(self, currMenu = ''):
if currMenu == '':
self.currIndex = None
self.currMenu = ''
else:
try:
t = self.menuDict[currMenu]
l = list(menuDict.keys())
except:
return
self.currIndex = [l.index(currMenu)]
self.currMenu = currMenu
except:
self.currIndex = None
self.currMenu = ''
def getCurrMenu(self):
return self.currMenu
def getActive(self):
@ -100,7 +104,10 @@ class vmenuManager():
def decLevel(self):
if self.currIndex == None:
return
if len(self.currIndex) == 1:
if self.currMenu != '':
if len(self.currIndex) == 2:
return
elif len(self.currIndex) == 1:
return
self.currIndex = self.currIndex[:len(self.currIndex) - 1]
print(self.currIndex)