|
@@ -1213,16 +1213,16 @@ class ShowBase(DirectObject.DirectObject):
|
|
|
for i in range(win.getNumInputDevices()):
|
|
for i in range(win.getNumInputDevices()):
|
|
|
name = win.getInputDeviceName(i)
|
|
name = win.getInputDeviceName(i)
|
|
|
mk = self.dataRoot.attachNewNode(MouseAndKeyboard(win, i, name))
|
|
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 = mw.node().getModifierButtons()
|
|
|
mb.addButton(KeyboardButton.shift())
|
|
mb.addButton(KeyboardButton.shift())
|
|
|
mb.addButton(KeyboardButton.control())
|
|
mb.addButton(KeyboardButton.control())
|
|
|
mb.addButton(KeyboardButton.alt())
|
|
mb.addButton(KeyboardButton.alt())
|
|
|
mb.addButton(KeyboardButton.meta())
|
|
mb.addButton(KeyboardButton.meta())
|
|
|
mw.node().setModifierButtons(mb)
|
|
mw.node().setModifierButtons(mb)
|
|
|
- bt = mw.attachNewNode(ButtonThrower(name))
|
|
|
|
|
|
|
+ bt = mw.attachNewNode(ButtonThrower("buttons%s" % (i)))
|
|
|
if (i != 0):
|
|
if (i != 0):
|
|
|
- bt.node().setPrefix('mousedev'+str(i)+'-')
|
|
|
|
|
|
|
+ bt.node().setPrefix('mousedev%s-' % (i))
|
|
|
mods = ModifierButtons()
|
|
mods = ModifierButtons()
|
|
|
mods.addButton(KeyboardButton.shift())
|
|
mods.addButton(KeyboardButton.shift())
|
|
|
mods.addButton(KeyboardButton.control())
|
|
mods.addButton(KeyboardButton.control())
|