# Sandbox.Mapping.Button

- Kind: class
- Namespace: `Sandbox.Mapping`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Component](/api/Sandbox.Component)
- Modifiers: sealed

## Constructors

- [`Button`](/api/Sandbox.Mapping.Button/.ctor)

## Properties

- [`AnimationCurve`](/api/Sandbox.Mapping.Button/AnimationCurve): Animation curve to use, X is the time between 0-1 and Y is how much the button is pressed from 0-1.
- [`AnimationTime`](/api/Sandbox.Mapping.Button/AnimationTime): How long in seconds should it take to animate this button.
- [`AutoReset`](/api/Sandbox.Mapping.Button/AutoReset)
- [`IsAnimating`](/api/Sandbox.Mapping.Button/IsAnimating): True if the button is currently animating
- [`IsOn`](/api/Sandbox.Mapping.Button/IsOn): True if the button is currently on
- [`Mode`](/api/Sandbox.Mapping.Button/Mode)
- [`Move`](/api/Sandbox.Mapping.Button/Move)
- [`MoveDelta`](/api/Sandbox.Mapping.Button/MoveDelta)
- [`MoveTarget`](/api/Sandbox.Mapping.Button/MoveTarget)
- [`OffSound`](/api/Sandbox.Mapping.Button/OffSound): Sound to play when the button is released.
- [`OnPressed`](/api/Sandbox.Mapping.Button/OnPressed): Called when the button is pressed. Receives the GameObject that pressed it.
- [`OnReleased`](/api/Sandbox.Mapping.Button/OnReleased): Called when the button is released. Receives the GameObject that released it.
- [`OnSound`](/api/Sandbox.Mapping.Button/OnSound): Sound to play when the button is pressed.
- [`OnTurnedOff`](/api/Sandbox.Mapping.Button/OnTurnedOff): Called when the button turns off.
- [`OnTurnedOn`](/api/Sandbox.Mapping.Button/OnTurnedOn): Called when the button turns on. Receives the GameObject that activated it.
- [`ResetTime`](/api/Sandbox.Mapping.Button/ResetTime)
- [`TooltipDescription`](/api/Sandbox.Mapping.Button/TooltipDescription)
- [`TooltipDescriptionOff`](/api/Sandbox.Mapping.Button/TooltipDescriptionOff)
- [`TooltipIcon`](/api/Sandbox.Mapping.Button/TooltipIcon)
- [`TooltipIconOff`](/api/Sandbox.Mapping.Button/TooltipIconOff)
- [`TooltipTitle`](/api/Sandbox.Mapping.Button/TooltipTitle)
- [`TooltipTitleOff`](/api/Sandbox.Mapping.Button/TooltipTitleOff)

## Methods

- [`Toggle`](/api/Sandbox.Mapping.Button/Toggle): Toggles the button between on and off states.
- [`TurnOff`](/api/Sandbox.Mapping.Button/TurnOff): Turns the button off. Does nothing if already off or animating.
- [`TurnOn`](/api/Sandbox.Mapping.Button/TurnOn): Turns the button on. Does nothing if already on or animating.
