Exemple #1
0
	def setupInputSystem(self):
		windowHandle = 0
		renderWindow = self.root.getAutoCreatedWindow()
		windowHandle = renderWindow.getCustomAttributeInt("WINDOW")
		paramList = [("WINDOW", str(windowHandle))]
		self.inputManager = OIS.createPythonInputSystem(paramList)
 
		# Now InputManager is initialized for use. Keyboard and Mouse objects
		# must still be initialized separately
		try:
			Input.init(
				self.inputManager.createInputObjectKeyboard(OIS.OISKeyboard, False), 
				self.inputManager.createInputObjectMouse(OIS.OISMouse, False)
			)
		except Exception, e:
			raise e