add parameter to getDescription
This commit is contained in:
parent
10ddc98d47
commit
482394c92a
@ -15,8 +15,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'adds the current word to the exceptions dictionary'
|
||||
|
||||
def run(self, environment):
|
||||
if not initialized:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True)
|
||||
|
@ -11,8 +11,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'clears the currently selected clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
environment['commandBuffer']['currClipboard'] = -1
|
||||
del environment['commandBuffer']['clipboard'][:]
|
||||
|
@ -9,8 +9,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'copies marked text to the currently selected clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
if (environment['commandBuffer']['Marks']['1'] == None) or \
|
||||
(environment['commandBuffer']['Marks']['2'] == None):
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'presents the current character.'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'phonetically presents the current character'
|
||||
|
||||
def run(self, environment):
|
||||
if (environment['screenData']['newCursorReview'] != None):
|
||||
cursorPos = environment['screenData']['newCursorReview'].copy()
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'speaks the contents of the currently selected clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
if len(environment['commandBuffer']['clipboard']) == 0:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True)
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'current line'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'reads the contents of the current screen'
|
||||
|
||||
def run(self, environment):
|
||||
if environment['screenData']['newContentText'].strip() == '':
|
||||
environment['runtime']['outputManager'].presentText(environment, "screen is empty", soundIcon='EmptyLine', interrupt=True)
|
||||
|
@ -9,8 +9,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'reads from the cursor to the bottom of the screen'
|
||||
|
||||
def run(self, environment):
|
||||
# Prefer review cursor over text cursor
|
||||
if (environment['screenData']['newCursorReview'] != None):
|
||||
|
@ -9,8 +9,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'Reads from the top of the screen to the cursor position'
|
||||
|
||||
def run(self, environment):
|
||||
# Prefer review cursor over text cursor
|
||||
if (environment['screenData']['newCursorReview'] != None):
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
return 'current word.'
|
||||
def getDescription(self, environment):
|
||||
return 'current word.'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -9,8 +9,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'phonetically spells the current word'
|
||||
|
||||
def run(self, environment):
|
||||
if (environment['screenData']['newCursorReview'] != None):
|
||||
cursorPos = environment['screenData']['newCursorReview'].copy()
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'displays the position of the review cursor'
|
||||
|
||||
def run(self, environment):
|
||||
# Prefer review cursor over text cursor
|
||||
|
||||
|
@ -9,8 +9,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'presents the date'
|
||||
|
||||
def run(self, environment):
|
||||
dateFormat = environment['runtime']['settingsManager'].getSetting(environment,'general', 'dateFormat')
|
||||
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'decrease sound volume'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'sound', 'volume')
|
||||
|
@ -8,12 +8,11 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'decreases the pitch of the speech'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'pitch')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
|
@ -8,12 +8,11 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'decreases the rate of the speech'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'rate')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
|
@ -8,12 +8,11 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'decreases the volume of the speech'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'volume')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.1:
|
||||
value = 0.1
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'exits review mode'
|
||||
|
||||
def run(self, environment):
|
||||
if (environment['screenData']['oldCursorReview'] == None) and \
|
||||
(environment['screenData']['newCursorReview'] == None):
|
||||
|
@ -11,8 +11,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'selects the first clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
if len(environment['commandBuffer']['clipboard']) == 0:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True)
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self, environment):
|
||||
environment['input']['keyForeward'] = True
|
||||
environment['runtime']['outputManager'].presentText(environment, 'Foreward next keypress', interrupt=True)
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'sends the following keypress to the terminal'
|
||||
|
||||
def run(self, environment):
|
||||
environment['input']['keyForeward'] = True
|
||||
environment['runtime']['outputManager'].presentText(environment, 'Foreward next keypress', interrupt=True)
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'adjusts the volume for in coming sounds'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'sound', 'volume')
|
||||
|
@ -8,12 +8,11 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'increases the pitch of the speech'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'pitch')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
|
@ -8,12 +8,11 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'increase the speech rat'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'rate')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
|
@ -8,12 +8,11 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'increase the speech volume'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'volume')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'shows the indention level for the current line'
|
||||
|
||||
def run(self, environment):
|
||||
# Prefer review cursor over text cursor
|
||||
|
||||
|
@ -11,8 +11,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'selects the last clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
if len(environment['commandBuffer']['clipboard']) == 0:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True)
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'displays the last received text'
|
||||
|
||||
def run(self, environment):
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=True)
|
||||
return environment
|
||||
|
@ -11,8 +11,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'pastes the text from the currently selected clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
currClipboard = environment['commandBuffer']['currClipboard']
|
||||
if currClipboard < 0:
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'speaks the currently selected text that will be copied to the clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
if (environment['commandBuffer']['Marks']['1'] == None) or \
|
||||
(environment['commandBuffer']['Marks']['2'] == None):
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'moves review to the next character and presents it'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -11,8 +11,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'selects the next clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
if len(environment['commandBuffer']['clipboard']) == 0:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True)
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'moves review to the next line and presents it'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'moves review to the next word and presents it'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'moves review to the previous character and presents it'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -11,8 +11,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'selects the previous clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
if len(environment['commandBuffer']['clipboard']) == 0:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True)
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'moves review to the previous line and presents it'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'moves review focus to the previous word and presents it'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'exits Fenrir'
|
||||
|
||||
def run(self, environment):
|
||||
environment['generalInformation']['running'] = False
|
||||
return environment
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'removes marks from selected text'
|
||||
|
||||
def run(self, environment):
|
||||
environment['commandBuffer']['Marks']['1'] = None
|
||||
environment['commandBuffer']['Marks']['2'] = None
|
||||
|
@ -15,8 +15,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'removes the current word from the exceptions dictionary'
|
||||
|
||||
def run(self, environment):
|
||||
if not initialized:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True)
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'move review to bottom of screen'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['newCursorReview'] = { 'x': 0, 'y':environment['screenData']['lines']}
|
||||
environment['runtime']['outputManager'].presentText(environment, "Bottom", interrupt=True)
|
||||
|
@ -8,8 +8,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'move review to top of screen'
|
||||
|
||||
def run(self, environment):
|
||||
environment['screenData']['newCursorReview'] = {'x':0,'y':0}
|
||||
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'places marks to select text to copy to the clipboard'
|
||||
|
||||
def run(self, environment):
|
||||
if environment['screenData']['newCursorReview'] == None:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'no review cursor', interrupt=True)
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'interrupts the current presentation'
|
||||
|
||||
def run(self, environment):
|
||||
environment['runtime']['outputManager'].interruptOutput(environment)
|
||||
def setCallback(self, callback):
|
||||
|
@ -15,8 +15,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'checks the spelling of the current word'
|
||||
|
||||
def run(self, environment):
|
||||
if not initialized:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True)
|
||||
|
@ -9,8 +9,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'presents the time'
|
||||
|
||||
def run(self, environment):
|
||||
timeFormat = environment['runtime']['settingsManager'].getSetting(environment,'general', 'timeFormat')
|
||||
|
||||
|
@ -7,10 +7,10 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'enables or disables automatic reading of new text as it appears'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
environment = environment['runtime']['settingsManager'].setSetting(environment, 'speech', 'autoReadIncomming', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming')))
|
||||
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'):
|
||||
environment['runtime']['outputManager'].presentText(environment, "autoread enabled", soundIcon='', interrupt=True)
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'enables or disables automatic spell checking'
|
||||
|
||||
def run(self, environment):
|
||||
environment = environment['runtime']['settingsManager'].setSetting(environment, 'general', 'autoSpellCheck', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck')))
|
||||
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'):
|
||||
|
@ -7,10 +7,10 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'enables and disables output in braille'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braille', 'enabled'):
|
||||
environment['runtime']['outputManager'].presentText(environment, "braille disabled", soundIcon='BrailleOff', interrupt=True)
|
||||
environment = environment['runtime']['settingsManager'].setSetting(environment, 'braille', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braille', 'enabled')))
|
||||
|
@ -7,8 +7,9 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'toggles all output settings'
|
||||
|
||||
def run(self, environment):
|
||||
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled') or \
|
||||
environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled') or \
|
||||
|
@ -7,10 +7,10 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'enables or disables sound'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled'):
|
||||
environment['runtime']['outputManager'].presentText(environment, "sound disabled", soundIcon='SoundOff', interrupt=True)
|
||||
environment = environment['runtime']['settingsManager'].setSetting(environment, 'sound', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled')))
|
||||
|
@ -7,10 +7,10 @@ class command():
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
def getDescription(self):
|
||||
def getDescription(self, environment):
|
||||
return 'enables or disables speech'
|
||||
|
||||
def run(self, environment):
|
||||
|
||||
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled'):
|
||||
environment['runtime']['outputManager'].presentText(environment, "speech disabled", soundIcon='SpeechOff', interrupt=True)
|
||||
environment = environment['runtime']['settingsManager'].setSetting(environment, 'speech', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled')))
|
||||
|
@ -54,7 +54,7 @@ class commandManager():
|
||||
if self.commandExists(environment, command, section):
|
||||
try:
|
||||
if environment['generalInformation']['tutorialMode']:
|
||||
environment['commands'][section][command].getDescription()
|
||||
environment['commands'][section][command].getDescription(environment)
|
||||
else:
|
||||
environment['commands'][section][command].run(environment)
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user