GamepadCode DpadWest

robot_2Generated
code_blocksInput

Description

The DpadWest field is a member of the GamepadCode enumeration in the Sandbox namespace. It represents the directional pad (D-pad) button on a game controller that is pressed towards the west (left) direction. This field is part of the game controller codes driven from SDL (Simple DirectMedia Layer), which is a cross-platform development library designed to provide low-level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.

Usage

Use the DpadWest field to detect when the left direction on the D-pad of a game controller is pressed. This can be useful for implementing navigation controls or character movement in a game.

Example

// Example of checking if the DpadWest button is pressed
if (Input.IsGamepadButtonDown(GamepadCode.DpadWest))
{
    // Move character to the left
    character.MoveLeft();
}