Update inputManager.py
This commit is contained in:
parent
b3281ccdee
commit
c956eb9f2d
@ -33,19 +33,21 @@ class inputManager():
|
||||
mEvent = self.env['runtime']['inputDriver'].getInputEvent()
|
||||
if mEvent:
|
||||
mEvent['EventName'] = self.convertEventName(mEvent['EventName'])
|
||||
if mEvent['EventValue'] == 0:
|
||||
return False
|
||||
eventReceived = True
|
||||
if mEvent['EventState'] == 0:
|
||||
if mEvent['EventName'] in self.env['input']['currInput']:
|
||||
self.env['input']['currInput'].remove(mEvent['EventName'])
|
||||
if len(self.env['input']['currInput']) > 1:
|
||||
self.env['input']['currInput'] = sorted(self.env['input']['currInput'])
|
||||
if len(self.env['input']['prevDeepestInput']) < len(self.env['input']['currInput']):
|
||||
self.env['input']['prevDeepestInput'] = self.env['input']['currInput'].copy()
|
||||
if len(self.env['input']['currInput']) == 0:
|
||||
self.env['input']['prevDeepestInput'] = []
|
||||
elif mEvent['EventState'] == 1:
|
||||
if not mEvent['EventName'] in self.env['input']['currInput']:
|
||||
self.env['input']['currInput'].append(mEvent['EventName'])
|
||||
if len(self.env['input']['currInput']) > 1:
|
||||
self.env['input']['currInput'] = sorted(self.env['input']['currInput'])
|
||||
if len(self.env['input']['prevDeepestInput']) < len(self.env['input']['currInput']):
|
||||
self.env['input']['prevDeepestInput'] = self.env['input']['currInput'].copy()
|
||||
elif mEvent['EventState'] == 2:
|
||||
pass
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user