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
DSlider:OnValueChanged( number x, number y )
Called when the values of this slider panel were changed.
number, number DSlider:TranslateValues( number x, number y )
For override by child panels, such as DNumSlider. Allows changing the output values of the slider.
Methods
number DSlider:GetLockX()
Returns the draggable panel's lock on the X axis.
See DSlider:SetLockX for more info.
number DSlider:GetLockY()
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.
number DSlider:GetSlideX()
Returns the target position of the draggable "knob" panel of the slider on the X axis.
Set by DSlider:SetSlideX.
number DSlider:GetSlideY()
Returns the target position of the draggable "knob" panel of the slider on the Y axis.
Set by DSlider:SetSlideY.
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.
DSlider:SetLockX( number lockX = nil )
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.
DSlider:SetLockY( number lockY = nil )
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: