GamePadState.IsButtonUp Method

Determines whether specified input device buttons are up (not pressed) in this GamePadState.

Namespace: Microsoft.Xna.Framework.Input
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public bool IsButtonUp (
         Buttons button
)

Parameters

  • button
    Buttons to query. Specify a single button, or combine multiple buttons using a bitwise OR operation.

Return Value

true if any specified buttons are up; false otherwise.

Remarks

For digital buttons (such as A, START, and right bumper) the return value indicates whether the button is up (not pressed).

For analog inputs (triggers and thumbsticks), the return value indicates whether the input exceeds dead zone values. For example, a trigger will be reported as not pressed until it is pulled about 12% of its full range. IsButtonUp always uses the default dead zone processing mode, GamePadDeadZone.IndependentAxes.

If multiple buttons are specified (by combining them using the bitwise OR operator), IsButtonUp returns true if any of the specified buttons are not pressed (or do not exceed dead zone values).

See Also

Reference

GamePadState Structure
GamePadState Members
Microsoft.Xna.Framework.Input Namespace
GamePadState.IsButtonDown Method
GamePad.GetState Method
GamePadDeadZone

Platforms

Xbox 360, Windows XP SP2, Windows Vista, Zune