finish quick menu
This commit is contained in:
parent
4178c37b72
commit
93b5498e04
@ -21,5 +21,3 @@ class command():
|
||||
self.env['runtime']['outputManager'].presentText(value, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -16,11 +16,8 @@ class command():
|
||||
def getDescription(self):
|
||||
return _('get next quick menu value')
|
||||
def run(self):
|
||||
try:
|
||||
if self.env['runtime']['quickMenuManager'].nextValue():
|
||||
value = self.env['runtime']['quickMenuManager'].getCurrentValue()
|
||||
self.env['runtime']['outputManager'].presentText(value, interrupt=True)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -67,18 +67,18 @@ class quickMenuManager():
|
||||
if not valueString in ['True','False']:
|
||||
return False
|
||||
value = not value
|
||||
self.env['runtime']['settingsManager'].setSettingAsBool(section, setting, value)
|
||||
self.env['runtime']['settingsManager'].setSetting(section, setting, str(value))
|
||||
elif isinstance(self.settings[section][setting], int):
|
||||
value = int(valueString)
|
||||
value += 1
|
||||
self.env['runtime']['settingsManager'].setSettingAsInt(section, setting, value)
|
||||
self.env['runtime']['settingsManager'].setSetting(section, setting, str(value))
|
||||
elif isinstance(self.settings[section][setting], float):
|
||||
value = float(valueString)
|
||||
value += 0.05
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSettingAsFloat(section, setting, value)
|
||||
except:
|
||||
self.env['runtime']['settingsManager'].setSetting(section, setting, str(value))
|
||||
except Exception as e:
|
||||
return False
|
||||
return True
|
||||
def prevValue(self):
|
||||
@ -99,20 +99,20 @@ class quickMenuManager():
|
||||
if not valueString in ['True','False']:
|
||||
return False
|
||||
value = not value
|
||||
self.env['runtime']['settingsManager'].setSettingAsBool(section, setting, value)
|
||||
self.env['runtime']['settingsManager'].setSetting(section, setting, str(value))
|
||||
elif isinstance(self.settings[section][setting], int):
|
||||
value = int(valueString)
|
||||
value -= 1
|
||||
if value < 0:
|
||||
value = 0
|
||||
self.env['runtime']['settingsManager'].setSettingAsInt(section, setting, value)
|
||||
self.env['runtime']['settingsManager'].setSetting(section, setting, str(value))
|
||||
elif isinstance(self.settings[section][setting], float):
|
||||
value = float(valueString)
|
||||
value -= 0.05
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
self.env['runtime']['settingsManager'].setSettingAsFloat(section, setting, value)
|
||||
except:
|
||||
self.env['runtime']['settingsManager'].setSetting(section, setting, str(value))
|
||||
except Exception as e:
|
||||
return False
|
||||
return True
|
||||
def getCurrentEntry(self):
|
||||
|
Loading…
Reference in New Issue
Block a user