minor change - mistake in joystick fix, util function for getting attrs from BGE types

This commit is contained in:
Campbell Barton 2009-05-15 02:03:27 +00:00
parent 0e423e5bb6
commit e8c0440660
2 changed files with 17 additions and 1 deletions

@ -249,7 +249,7 @@ bool SCA_Joystick::CreateJoystickDevice(void)
else if (m_axismax < 0) m_axismax = 0;
if(m_buttonmax<0) m_buttonmax= 0;
if(m_hatmax<0) m_buttonmax= 0;
if(m_hatmax<0) m_hatmax= 0;
}
return true;
#endif

@ -5504,3 +5504,19 @@ class KX_Camera(KX_GameObject):
@type right: int
@type top: int
"""
# Util func to extract all attrs
"""
import types
attrs = []
for name, val in __builtins__.locals().items():
if name.startswith('__'):
continue
if type(val) == types.ClassType:
for line in val.__doc__.split('\n'):
if '@ivar' in line:
attrs.append(name + '::' + line.split()[1].replace(':', ''))
for a in attrs:
print a
"""