DSlider
Description
Creates a slider that can be moved along the X and/or Y axis
Parent
Derives methods, etc not listed on this page from Panel.
Events
Called when the values of this slider panel were changed.
DSlider:ResetToDefaultValue()
This function is called by the DSlider when user middle mouse clicks on the draggable knob of the slider.
You are meant to override this function to do reset the slider to desired defaults on both axes.
By default, will reset the slider to 0. 5 on both axes.
For override by child panels, such as DNumSlider. Allows changing the output values of the slider.
Methods
DSlider:ConVarXNumberThink()
This is used internally - although you're able to use it you probably shouldn't.
Used internally to set the X axis convar.
DSlider:ConVarYNumberThink()
This is used internally - although you're able to use it you probably shouldn't.
Used internally to set the Y axis convar.
boolean DSlider:GetDragging()
Identical to DSlider:IsEditing
Returns the draggable panel's lock on the X axis.
See DSlider:SetLockX for more info.
Returns the draggable panel's lock on the Y axis.
See DSlider:SetLockY for more info.
Color DSlider:GetNotchColor()
We advise against using this. It may be changed or removed in a future update.
Does not affect anything by default.
Returns the current notch color, set by DSlider:SetNotchColor
number DSlider:GetNotches()
We advise against using this. It may be changed or removed in a future update.
Appears to be non functioning, however is still used by panels such as DNumSlider.
any DSlider:GetNumSlider()
We advise against using this. It may be changed or removed in a future update.
Does nothing.
Returns the target position of the draggable "knob" panel of the slider on the X axis.
Set by DSlider:SetSlideX.
Returns the target position of the draggable "knob" panel of the slider on the Y axis.
Set by DSlider:SetSlideY.
boolean DSlider:GetTrapInside()
Returns the value set by DSlider:SetTrapInside.
DSlider:OnValuesChangedInternal()
This is used internally - although you're able to use it you probably shouldn't.
Used internally to fire DSlider:OnValueChanged
DSlider:SetBackground( string path )
Sets the background for the slider.
DSlider:SetConVarX( string convar )
Sets the ConVar to be set when the slider changes on the X axis.
DSlider:SetConVarY( string convar )
Sets the ConVar to be set when the slider changes on the Y axis.
DSlider:SetDragging( boolean dragging )
This is used internally - although you're able to use it you probably shouldn't.
Sets whether or not the slider is being dragged.
DSlider:SetImage()
We advise against using this. It may be changed or removed in a future update.
Does nothing.
DSlider:SetImageColor()
We advise against using this. It may be changed or removed in a future update.
Does nothing.
Sets the lock on the X axis.
For example the value 0. 5 will lock the draggable panel to half the width of the slider's panel.
Sets the lock on the Y axis.
For example the value 0. 5 will lock the draggable panel to half the height of the slider's panel.
DSlider:SetNotchColor( Color clr )
We advise against using this. It may be changed or removed in a future update.
Does not affect anything by default.
Sets the current notch color, overriding the color set by the derma skin.
DSlider:SetNotches( number notches )
We advise against using this. It may be changed or removed in a future update.
Appears to be non functioning, however is still used by panels such as DNumSlider.
DSlider:SetNumSlider( any slider )
We advise against using this. It may be changed or removed in a future update.
Does nothing.
DSlider:SetTrapInside( boolean trap )
Makes the slider itself, the "knob", trapped within the bounds of the slider panel. Example: