mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Made alt modifier information get sent while mouse button 1 is still pressed
This commit is contained in:
parent
5e1ac15ba8
commit
e44724fc4b
@ -118,6 +118,7 @@ class DirectSession(DirectObject):
|
||||
self.fControl = 0
|
||||
self.fAlt = 0
|
||||
self.fShift = 0
|
||||
self.fMouse1 = 0 # [gjeon] to update alt key information while mouse1 is pressed
|
||||
|
||||
self.pos = VBase3()
|
||||
self.hpr = VBase3()
|
||||
@ -374,8 +375,10 @@ class DirectSession(DirectObject):
|
||||
def inputHandler(self, input):
|
||||
# Deal with keyboard and mouse input
|
||||
if input == 'mouse1-up':
|
||||
self.fMouse1 = 0 # [gjeon] to update alt key information while mouse1 is pressed
|
||||
messenger.send('DIRECT-mouse1Up')
|
||||
elif input.find('mouse1') != -1:
|
||||
self.fMouse1 = 1 # [gjeon] to update alt key information while mouse1 is pressed
|
||||
modifiers = self.getModifiers(input, 'mouse1')
|
||||
messenger.send('DIRECT-mouse1', sentArgs = [modifiers])
|
||||
elif input == 'mouse2-up':
|
||||
@ -398,6 +401,11 @@ class DirectSession(DirectObject):
|
||||
self.fControl = 0
|
||||
elif input == 'alt':
|
||||
self.fAlt = 1
|
||||
# [gjeon] to update alt key information while mouse1 is pressed
|
||||
if self.fMouse1:
|
||||
modifiers = DIRECT_NO_MOD
|
||||
modifiers |= DIRECT_ALT_MOD
|
||||
messenger.send('DIRECT-mouse1', sentArgs = [modifiers])
|
||||
elif input == 'alt-up':
|
||||
self.fAlt = 0
|
||||
elif input == 'page_up':
|
||||
|
Loading…
x
Reference in New Issue
Block a user