major rework, performance boost and bigger accuracy
This commit is contained in:
@ -4,6 +4,7 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
return environment
|
||||
if environment['screenData']['newCursor'] == environment['screenData']['oldCursor'] and\
|
||||
environment['screenData']['newDelta'] == environment['screenData']['oldDelta']:
|
||||
return environment
|
||||
|
@ -1,21 +0,0 @@
|
||||
#!/bin/python
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
if environment['screenData']['newCursor']['x'] > environment['screenData']['oldCursor']['x']:
|
||||
return environment
|
||||
|
||||
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
||||
return environment
|
||||
if environment['screenData']['newDelta'] == environment['screenData']['oldDelta']:
|
||||
return environment
|
||||
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=True)
|
||||
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
def shutdown(self):
|
||||
pass
|
@ -4,6 +4,9 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
|
||||
if environment['screenData']['newDelta'] != environment['screenData']['oldDelta']:
|
||||
return environment
|
||||
if environment['screenData']['newCursor']['y'] != environment['screenData']['oldCursor']['y'] or\
|
||||
environment['screenData']['newCursor']['x'] == environment['screenData']['oldCursor']['x']:
|
||||
return environment
|
||||
@ -11,7 +14,7 @@ class command():
|
||||
pass
|
||||
#environment['runtime']['outputManager'].presentText(environment, "blank",True)
|
||||
else:
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']],True)
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']],interrupt=True)
|
||||
|
||||
return environment
|
||||
def setCallback(self, callback):
|
@ -4,6 +4,7 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
|
||||
if environment['screenData']['newDelta'] != environment['screenData']['oldDelta']:
|
||||
return environment
|
||||
if environment['screenData']['newCursor']['y'] == environment['screenData']['oldCursor']['y']:
|
@ -4,6 +4,7 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
|
||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charEcho'):
|
||||
return environment
|
||||
if environment['screenData']['newCursor']['x'] <= environment['screenData']['oldCursor']['x']:
|
@ -5,7 +5,7 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
|
||||
return environment
|
||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'wordEcho') and\
|
||||
environment['screenData']['newCursor']['x'] <= environment['screenData']['oldCursor']['x']:
|
||||
return environment
|
||||
@ -22,7 +22,7 @@ class command():
|
||||
if environment['screenData']['newCursor']['x'] > 0 and \
|
||||
newContent[environment['screenData']['newCursor']['x'] - 1] == ' ':
|
||||
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
|
||||
|
||||
print('word')
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -4,16 +4,16 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charEcho') and\
|
||||
environment['screenData']['newCursor']['x'] - environment['screenData']['oldCursor']['x'] ==1:
|
||||
if environment['screenData']['newCursor']['x'] > environment['screenData']['oldCursor']['x']:
|
||||
return environment
|
||||
|
||||
ttyChanged = environment['screenData']['newTTY'] != environment['screenData']['oldTTY']
|
||||
if environment['screenData']['newDelta'] == environment['screenData']['oldDelta'] and \
|
||||
not ttyChanged:
|
||||
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
||||
return environment
|
||||
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], soundIconName='', interrupt=ttyChanged)
|
||||
if environment['screenData']['newDelta'] == environment['screenData']['oldDelta']:
|
||||
return environment
|
||||
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=False)
|
||||
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user