s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Components
Button
chevron_left
Components
class
Button
Constructors
functions
Button
Properties
data_object
AnimationCurve
data_object
AnimationTime
data_object
AutoReset
data_object
IsAnimating
data_object
IsOn
data_object
Mode
data_object
Move
data_object
MoveDelta
data_object
MoveTarget
data_object
OffSound
data_object
OnPressed
data_object
OnReleased
data_object
OnSound
data_object
OnTurnedOff
data_object
OnTurnedOn
data_object
ResetTime
data_object
TooltipDescription
data_object
TooltipDescriptionOff
data_object
TooltipIcon
data_object
TooltipIconOff
data_object
TooltipTitle
data_object
TooltipTitleOff
Methods
functions
Toggle
functions
TurnOff
functions
TurnOn
Button
class
Sandbox.Mapping
.
account_tree
extends
Component
sealed
Sandbox.Engine
build
Constructors
1
Button
(
)
data_object
Properties
22
AnimationCurve
Curve
Animation curve to use, X is the time between 0-1 and Y is how much the button is pressed from 0-1.
AnimationTime
float
How long in seconds should it take to animate this button.
AutoReset
bool
IsAnimating
bool
True if the button is currently animating
IsOn
bool
True if the button is currently on
Mode
ButtonMode
Move
bool
MoveDelta
Vector3
MoveTarget
GameObject
OffSound
SoundEvent
Sound to play when the button is released.
OnPressed
Doo
Called when the button is pressed. Receives the GameObject that pressed it.
OnReleased
Doo
Called when the button is released. Receives the GameObject that released it.
OnSound
SoundEvent
Sound to play when the button is pressed.
OnTurnedOff
Doo
Called when the button turns off.
OnTurnedOn
Doo
Called when the button turns on. Receives the GameObject that activated it.
ResetTime
float
TooltipDescription
string
TooltipDescriptionOff
string
TooltipIcon
string
TooltipIconOff
string
TooltipTitle
string
TooltipTitleOff
string
functions
Methods
3
Toggle
(
presser
)
Toggles the button between on and off states.
TurnOff
(
)
Turns the button off. Does nothing if already off or animating.
TurnOn
(
presser
)
Turns the button on. Does nothing if already on or animating.
Inheritance
Component
Button
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.