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