Bagikan melalui


GamePadButtons Structure

Identifies whether buttons on an Xbox 360 Controller are pressed or released.

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

Syntax

public struct GamePadButtons

Remarks

Bb196996.bp(en-us,XNAGameStudio.41).gifBest Practice
  • If your game allows the player to control acceleration using the Xbox 360 Controller, you may check GameDefaults.AccelerateWithButtons to determine whether the player prefers using gamepad buttons or triggers to control acceleration.
  • If your game allows the player to control braking using the Xbox 360 Controller, you may check GameDefaults.BrakeWithButtons to determine if the player prefers using gamepad buttons or triggers to control braking.

See Also

Tasks

Detecting Xbox 360 Controller Button Presses (Xbox 360, Windows)
Determining If an Xbox 360 Controller Is Disconnected (Xbox 360, Windows)

Concepts

Overview of User Input and Input Devices

Reference

GamePadButtons Members
Microsoft.Xna.Framework.Input Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone