add initial keyforwart for new input handling

This commit is contained in:
chrys
2016-09-25 20:30:50 +02:00
parent e02b33f653
commit 6ae0cd85fa
4 changed files with 6 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class command():
return 'sends the following keypress to the terminal'
def run(self):
self.env['input']['keyForeward'] = 2
self.env['input']['keyForeward'] = 3
self.env['runtime']['outputManager'].presentText('Foreward next keypress', interrupt=True)
def setCallback(self, callback):

View File

@ -51,6 +51,8 @@ class fenrir():
self.environment['runtime']['inputManager'].clearEventBuffer()
if self.environment['generalInformation']['tutorialMode']:
self.environment['runtime']['inputManager'].clearEventBuffer()
if self.environment['input']['keyForeward'] > 0:
self.environment['input']['keyForeward'] -=1
self.environment['input']['prevDeepestInput'] = []
self.environment['runtime']['screenManager'].update()
@ -72,7 +74,7 @@ class fenrir():
self.handleCommands()
def prepareCommand(self):
if self.environment['input']['keyForeward']:
if self.environment['input']['keyForeward'] > 0:
return
shortcut = self.environment['runtime']['inputManager'].getCurrShortcut()
print(shortcut)