blackberry-gaming/GamePlay — pull request #497 by kcunney (2012-06-25 22:52:47+00:00)
Title: Adds Gamepad support to Gameplay.

Adds Gamepad class to gameplay.
Stores Gamepad objects in Game.
Adds Gamepad* createGamepad(const char* gamepadFormPath) to Game.
Adds Gamepad* getGamepad(unsigned int playerIndex=0) to Game.
Adds void gamepadEvent(Gamepad::GamepadEvent evt, Gamepad* gamepad, unsigned int index) event callback to Game.
Adds const char* getType() on Control and has each child of Control implement the function, returning the name of the class as a string in camel-casing.
Adds concept of contact index at the Control level. This allows for more than one Control to be active/in focus at once. Had to refactor some Control's touchEvents to handle this. Setting the contactIndex on a TOUCH_PRESS event, and then resetting it to INVALID_CONTACT_INDEX on TOUCH_RELEASE.
Fixes memory leak in FrameBuffer.
Code cleanup, removes some warnings.

Included from Adam's UI fixes:
All controls now take focus in the same way.
Tab key switches focus to next control in a container.
Fixed a memory leak in Form when using the empty style.
Removed unneccessary comments from SpriteBatch.
Fixed some crashes in TextBox.
Adding mouse event handler to Slider.