API ReferenceSandbox.Mapping

Buttonclass

objectComponentButton
Namespace
Sandbox.Mapping
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Mapping.Button : Sandbox.Component

Constructors1

Showing 1 constructors

public Button()PUBLICCONSTRUCTOR

Methods3

Showing 3 methods

public void Toggle(Sandbox.GameObject presser)PUBLIC

Toggles the button between on and off states.

ParameterTypeDescription
presserGameObject
Returns:void

public void TurnOff()PUBLIC

Turns the button off. Does nothing if already off or animating.

Returns:void

public void TurnOn(Sandbox.GameObject presser = null)PUBLIC

Turns the button on. Does nothing if already on or animating.

ParameterTypeDescription
presser = nullGameObject
Returns:void

Properties22

Showing 22 properties

public Sandbox.Curve Sandbox.Mapping.Button.AnimationCurve { get; set; }PUBLICGETSET

Animation curve to use, X is the time between 0-1 and Y is how much the button is pressed from 0-1.

Returns:Curve

public float Sandbox.Mapping.Button.AnimationTime { get; set; }PUBLICGETSET

How long in seconds should it take to animate this button.

Returns:float

public bool Sandbox.Mapping.Button.AutoReset { get; set; }PUBLICGETSET

Returns:bool

public bool Sandbox.Mapping.Button.IsAnimating { get; set; }PUBLICGETSET

True if the button is currently animating

Returns:bool

public bool Sandbox.Mapping.Button.IsOn { get; set; }PUBLICGETSET

True if the button is currently on

Returns:bool

public bool Sandbox.Mapping.Button.Move { get; set; }PUBLICGETSET

Returns:bool

public Sandbox.SoundEvent Sandbox.Mapping.Button.OffSound { get; set; }PUBLICGETSET

Sound to play when the button is released.

Returns:SoundEvent

public Sandbox.Doo Sandbox.Mapping.Button.OnPressed { get; set; }PUBLICGETSET

Called when the button is pressed. Receives the GameObject that pressed it.

Returns:Doo

public Sandbox.Doo Sandbox.Mapping.Button.OnReleased { get; set; }PUBLICGETSET

Called when the button is released. Receives the GameObject that released it.

Returns:Doo

public Sandbox.SoundEvent Sandbox.Mapping.Button.OnSound { get; set; }PUBLICGETSET

Sound to play when the button is pressed.

Returns:SoundEvent

public Sandbox.Doo Sandbox.Mapping.Button.OnTurnedOff { get; set; }PUBLICGETSET

Called when the button turns off.

Returns:Doo

public Sandbox.Doo Sandbox.Mapping.Button.OnTurnedOn { get; set; }PUBLICGETSET

Called when the button turns on. Receives the GameObject that activated it.

Returns:Doo

public float Sandbox.Mapping.Button.ResetTime { get; set; }PUBLICGETSET

Returns:float

public string Sandbox.Mapping.Button.TooltipDescription { get; set; }PUBLICGETSET

Returns:string

public string Sandbox.Mapping.Button.TooltipDescriptionOff { get; set; }PUBLICGETSET

Returns:string

public string Sandbox.Mapping.Button.TooltipIcon { get; set; }PUBLICGETSET

Returns:string

public string Sandbox.Mapping.Button.TooltipIconOff { get; set; }PUBLICGETSET

Returns:string

public string Sandbox.Mapping.Button.TooltipTitle { get; set; }PUBLICGETSET

Returns:string

public string Sandbox.Mapping.Button.TooltipTitleOff { get; set; }PUBLICGETSET

Returns:string

On this page

Constructorspublic Button()Methodspublic System.Void Toggle(Sandbox.GameObject presser)public System.Void TurnOff()public System.Void TurnOn(Sandbox.GameObject presser = null)Propertiespublic Sandbox.Curve Sandbox.Mapping.Button.AnimationCurve { get; set; }public System.Single Sandbox.Mapping.Button.AnimationTime { get; set; }public System.Boolean Sandbox.Mapping.Button.AutoReset { get; set; }public System.Boolean Sandbox.Mapping.Button.IsAnimating { get; set; }public System.Boolean Sandbox.Mapping.Button.IsOn { get; set; }public Sandbox.Mapping.Button.ButtonMode Sandbox.Mapping.Button.Mode { get; set; }public System.Boolean Sandbox.Mapping.Button.Move { get; set; }public Vector3 Sandbox.Mapping.Button.MoveDelta { get; set; }public Sandbox.GameObject Sandbox.Mapping.Button.MoveTarget { get; set; }public Sandbox.SoundEvent Sandbox.Mapping.Button.OffSound { get; set; }public Sandbox.Doo Sandbox.Mapping.Button.OnPressed { get; set; }public Sandbox.Doo Sandbox.Mapping.Button.OnReleased { get; set; }public Sandbox.SoundEvent Sandbox.Mapping.Button.OnSound { get; set; }public Sandbox.Doo Sandbox.Mapping.Button.OnTurnedOff { get; set; }public Sandbox.Doo Sandbox.Mapping.Button.OnTurnedOn { get; set; }public System.Single Sandbox.Mapping.Button.ResetTime { get; set; }public System.String Sandbox.Mapping.Button.TooltipDescription { get; set; }public System.String Sandbox.Mapping.Button.TooltipDescriptionOff { get; set; }public System.String Sandbox.Mapping.Button.TooltipIcon { get; set; }public System.String Sandbox.Mapping.Button.TooltipIconOff { get; set; }public System.String Sandbox.Mapping.Button.TooltipTitle { get; set; }public System.String Sandbox.Mapping.Button.TooltipTitleOff { get; set; }Metadata