Revision: 825
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=825&view=rev
Author: andy_miller
Date: 2008-11-28 12:39:02 +0000 (Fri, 28 Nov 2008)
Log Message:
-----------
Added comments to the sample framework showing alternate ways to use OIS
Modified Paths:
--------------
trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py
Modified: trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py
===================================================================
--- trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-11-28 12:12:52 UTC (rev 824)
+++ trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-11-28 12:39:02 UTC (rev 825)
@@ -313,15 +313,23 @@
else:
windowHnd = self.renderWindow.getCustomAttributeInt("WINDOW")
+ #
+ # Here is where we create the OIS input system using a helper function that takes python list of tuples
+ #
t= self._inputSystemParameters()
params = [("WINDOW",str(windowHnd))]
params.extend(t)
self.InputManager = OIS.createPythonInputSystem( params )
- #pl = OIS.ParamList()
- #windowHndStr = str ( windowHnd)
- #pl.insert("WINDOW", windowHndStr)
- #im = OIS.InputManager.createInputSystem( pl )
+ #
+ # an alternate way is to use a multimap which is exposed in ogre
+ #
+# pl = ogre.SettingsMultiMap()
+# windowHndStr = str(windowHnd)
+# pl.insert("WINDOW", windowHndStr)
+# for v in self._inputSystemParameters():
+# pl.insert(v[0],v[1])
+# im = OIS.InputManager.createInputSystem( pl )
#Create all devices (We only catch joystick exceptions here, as, most people have Key/Mouse)
self.Keyboard = self.InputManager.createInputObjectKeyboard( OIS.OISKeyboard, self.bufferedKeys )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|