This project is read-only.

Rework GamePadState


Need someway to create an instance of GamePadState that can be returned from GamePad.GetState(). We can't use static variables here. Example.
state = GamePad.GetState();
if(state.IsPressed() && !_lastState.IsPressed())
_lastState = state;
This works fine in the XNA frameworks. I've KDW already implemented something for Keyboard, but GamePad looked a little more tricky


kevindwolf wrote Mar 29, 2009 at 6:33 PM

Changed MapKeyboardToGamePadButton(Buttons b, System.Windows.Input.Key) to MapKeyboardToGamePadButton(Buttons b, SilverArcade.SilverSprite.Input.Keys)

kevindwolf wrote Apr 1, 2009 at 12:06 AM

Remaining issues:
1) It would appear the TargetElement.KeyDown event does not get fired for the Key.Enter
2) Code is in place for left and right trigger. Right now GetButtonState only goes from 1 to Input.Buttons.Y, not sure of the reasoning, but didn't want to change this.
3) In the test page, it would appear as if when you hit the space key, the KeyDown event fires, but then the Button captures focus and the test page never sees the KeyUp event, this the test is misleading

wrote Apr 1, 2009 at 12:06 AM

wrote Apr 1, 2009 at 12:07 AM

wrote Feb 14, 2013 at 7:14 PM