Project/01 - MonoGame/MonoGame.Framework/Input/GamePadState.cs
/// <summary>
/// Gets the button mask along with 'virtual buttons' like LeftThumbstickLeft.
/// </summary>
Gets the button mask along with 'virtual buttons' like LeftThumbstickLeft.
Gets the button mask along with ' virtual buttons ' like LeftThumbstickLeft .
private Buttons GetVirtualButtons () {
            var result = Buttons.buttons;
            result |= ThumbSticks.VirtualButtons;
            if (DPad.Down == ButtonState.Pressed)
                result |= Microsoft.Xna.Framework.Input.Buttons.DPadDown;
            if (DPad.Up == ButtonState.Pressed)
                result |= Microsoft.Xna.Framework.Input.Buttons.DPadUp;
            if (DPad.Left == ButtonState.Pressed)
                result |= Microsoft.Xna.Framework.Input.Buttons.DPadLeft;
            if (DPad.Right == ButtonState.Pressed)
                result |= Microsoft.Xna.Framework.Input.Buttons.DPadRight;
            return result;
        }
private Buttons GetVirtualButtons ( ) { var result = Buttons . buttons ; result |= ThumbSticks . VirtualButtons ; if ( DPad . Down == ButtonState . Pressed ) result |= Microsoft . Xna . Framework . Input . Buttons . DPadDown ; if ( DPad . Up == ButtonState . Pressed ) result |= Microsoft . Xna . Framework . Input . Buttons . DPadUp ; if ( DPad . Left == ButtonState . Pressed ) result |= Microsoft . Xna . Framework . Input . Buttons . DPadLeft ; if ( DPad . Right == ButtonState . Pressed ) result |= Microsoft . Xna . Framework . Input . Buttons . DPadRight ; return result ; }
Gets the button mask along with 'virtual buttons' like LeftThumbstickLeft.
Gets the button mask along with ' virtual buttons ' like LeftThumbstickLeft .