try command structure, fix tutorial mode command
This commit is contained in:
parent
0f10ecd08a
commit
11289c09cd
@ -22,7 +22,7 @@ class inputManager():
|
||||
timeout = False
|
||||
environment['input']['firstEvent'] = event
|
||||
environment['input']['currEvent'] = event
|
||||
if not
|
||||
#if not
|
||||
#print(event)
|
||||
|
||||
return timeout
|
||||
|
@ -17,7 +17,6 @@ class outputManager():
|
||||
environment['runtime']['speechDriver'].shutdown(environment)
|
||||
|
||||
def presentText(self, environment, text, interrupt=True, soundIcon = ''):
|
||||
print(soundIcon,text)
|
||||
environment['runtime']['debug'].writeDebugOut(environment,"presentText:\nsoundIcon:'"+soundIcon+"'\nText:\n" + text ,debug.debugLevel.INFO)
|
||||
if self.playSoundIcon(environment, soundIcon, interrupt):
|
||||
environment['runtime']['debug'].writeDebugOut(environment,"soundIcon found" ,debug.debugLevel.INFO)
|
||||
|
@ -45,7 +45,7 @@ class settingsManager():
|
||||
shortcutKeys.append(key.upper())
|
||||
shortcut.append(shortcutRepeat)
|
||||
shortcut.append(sorted(shortcutKeys))
|
||||
print(str(shortcut))
|
||||
print(str(shortcut), commandName)
|
||||
environment['bindings'][str(shortcut)] = commandName
|
||||
kbConfig.close()
|
||||
|
||||
|
@ -33,8 +33,9 @@ class fenrir():
|
||||
self.shutdown()
|
||||
|
||||
def handleProcess(self):
|
||||
time.sleep(3)
|
||||
timeout = self.environment['runtime']['inputManager'].proceedInputEvent(self.environment)
|
||||
timeout = True
|
||||
timeout = False
|
||||
try:
|
||||
self.environment['runtime']['screenManager'].update(self.environment)
|
||||
except Exception as e:
|
||||
@ -42,18 +43,17 @@ class fenrir():
|
||||
self.environment['runtime']['debug'].writeDebugOut(self.environment, str(e),debug.debugLevel.ERROR)
|
||||
if not (self.environment['input']['keyForeward'] or timeout):
|
||||
#currShortcut = self.environment['runtime']['inputManager'].getCurrShortcut(self.environment)
|
||||
shortcut = ''
|
||||
shortcut = "[1, ['KEY_FENRIR', 'KEY_T']]"
|
||||
command = self.environment['runtime']['inputManager'].getCommandForShortcut(self.environment, shortcut)
|
||||
self.environment['runtime']['commandManager'].queueCommand(self.environment, command)
|
||||
if not timeout:
|
||||
self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onInput')
|
||||
self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onScreenChanged')
|
||||
if not self.environment['input']['keyForeward']:
|
||||
if self.environment['runtime']['commandManager'].isCommandQueued():
|
||||
self.handleCommands()
|
||||
|
||||
def handleCommands(self):
|
||||
if (self.environment['commandInfo']['currCommand'] != ''):
|
||||
if self.environment['runtime']['commandManager'].isCommandQueued(self.environment):
|
||||
self.environment['runtime']['commandManager'].executeCommand(self.environment, self.environment['commandInfo']['currCommand'], 'commands')
|
||||
|
||||
def shutdownRequest(self):
|
||||
|
Loading…
Reference in New Issue
Block a user