def enterActive(self): OrbitCamera.enterActive(self) self.accept('wheel_up', self._handleWheelUp) self.accept('wheel_down', self._handleWheelDown) self._scInputState = ScratchPad() self._scInputState.rmbPressed = False self._scInputState.fwdPressed = False self._scInputListener = DirectObject.DirectObject() self._scInputListener.accept(inputState.getEventName('RMB'), self._handleRmbEvent) self._handleRmbEvent(inputState.isSet('RMB')) self._scInputListener.accept(inputState.getEventName('forward'), self._handleForwardEvent) self._handleForwardEvent(inputState.isSet('forward'))
def enterActive(self): OrbitCamera.enterActive(self) self.accept('wheel_up', self._handleWheelUp) self.accept('wheel_down', self._handleWheelDown) self._scInputState = ScratchPad() self._scInputState.rmbPressed = False self._scInputState.fwdPressed = False self._scInputListener = DirectObject.DirectObject() self._scInputListener.accept(inputState.getEventName('RMB'), self._handleRmbEvent) self._handleRmbEvent(inputState.isSet('RMB')) self._scInputListener.accept(inputState.getEventName('forward'), self._handleForwardEvent) self._handleForwardEvent(inputState.isSet('forward')) if hasattr(self.subject, 'doId'): self.speedAcceptName = 'setShipSpeed-%s' % self.subject.doId self.accept(self.speedAcceptName, self.recordShipSpeed)