mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
better mousewatcher and buttonthrower names
This commit is contained in:
parent
cc8530f8a9
commit
e2815caa72
@ -1213,16 +1213,16 @@ class ShowBase(DirectObject.DirectObject):
|
||||
for i in range(win.getNumInputDevices()):
|
||||
name = win.getInputDeviceName(i)
|
||||
mk = self.dataRoot.attachNewNode(MouseAndKeyboard(win, i, name))
|
||||
mw = mk.attachNewNode(MouseWatcher(name))
|
||||
mw = mk.attachNewNode(MouseWatcher("watcher%s" % (i)))
|
||||
mb = mw.node().getModifierButtons()
|
||||
mb.addButton(KeyboardButton.shift())
|
||||
mb.addButton(KeyboardButton.control())
|
||||
mb.addButton(KeyboardButton.alt())
|
||||
mb.addButton(KeyboardButton.meta())
|
||||
mw.node().setModifierButtons(mb)
|
||||
bt = mw.attachNewNode(ButtonThrower(name))
|
||||
bt = mw.attachNewNode(ButtonThrower("buttons%s" % (i)))
|
||||
if (i != 0):
|
||||
bt.node().setPrefix('mousedev'+str(i)+'-')
|
||||
bt.node().setPrefix('mousedev%s-' % (i))
|
||||
mods = ModifierButtons()
|
||||
mods.addButton(KeyboardButton.shift())
|
||||
mods.addButton(KeyboardButton.control())
|
||||
|
Loading…
x
Reference in New Issue
Block a user