s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News published_with_changesChangesRelease-by-release changelog
Games
Browse Games Discover Games
gamejamslive now

Game Jam III

Ends Fri 25 Sep
ThemeOne More Round

The jam is running. Build something, or play the entries.

£50,000
prizepool
View the jam
Workshop
Playable
sports_esportsGamesStandalone games and gamemodes
Assets
landscapeMaps view_in_arModels textureMaterials apparelClothing
appsEverythingEvery asset type in one list
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
Classes
SliderControl
chevron_left Classes
class
SliderControl

Constructors

functionsSliderControl

Properties

data_objectFilldata_objectMaxdata_objectMindata_objectNumberFormatdata_objectOnValueChangeddata_objectShowRangedata_objectShowTextEntrydata_objectShowValueTooltipdata_objectStepdata_objectSupportsMultiEditdata_objectTickStepdata_objectValue

Methods

lockOnMiddleClicklockOnMouseDownlockOnMouseMovefunctionsRebuildfunctionsScreenPosToValuefunctionsTick
SliderControl
A float control drawn as a draggable slider, optionally with a text entry.
class Sandbox.UI .account_tree extends BaseControl
Sandbox.Engine

build Constructors 1

SliderControl ()

data_object Properties 12

Fill
SliderFill
Which part of the track is drawn filled - from the left up to the thumb by default.
Max
float
The right side of the slider.
Min
float
The left side of the slider.
NumberFormat
string
How to display numbers in this control
OnValueChanged
Action`1
ShowRange
bool
Show the range values above the slider
ShowTextEntry
bool
Show a text entry next to the slider
ShowValueTooltip
bool
When changing the value show the tooltip
Step
float
If set to 1, value will be rounded to 1's If set to 10, value will be rounded to 10's If set to 0.1, value will be rounded to 0.1's
SupportsMultiEdit
bool
TickStep
float
Draw a mark on the track every this many units, counting up from Sandbox.UI.SliderControl.Min. 0 for none.
Value
float

functions Methods 6

OnMiddleClick (e)
OnMouseDown (e)
On mouse press jump to that position
OnMouseMove (e)
If we move the mouse while we're being pressed then set the value
Rebuild ()
ScreenPosToValue (pos)
float
Convert a screen position to a value. The value is clamped, but not snapped.
Tick ()

Inheritance

Panel
BaseControl
SliderControl
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter