SliderPackData
Create a SliderPackdata
object with Engine.createAndRegisterSliderPackData
and modify its content via script.
const var SliderPackData = Engine.createAndRegisterSliderPackData(0);
Class methods
fromBase64
Restores the data from the B64 string. Edit on GitHub
SliderPackData.fromBase64( String b64)
getCurrentlyDisplayedIndex
Returns the currently displayed slider index. Edit on GitHub
SliderPackData.getCurrentlyDisplayedIndex()
getDataAsBuffer
Returns a Buffer object containing all slider values (as reference). Edit on GitHub
SliderPackData.getDataAsBuffer()
getNumSliders
Returns the amount of sliders. Edit on GitHub
SliderPackData.getNumSliders()
getStepSize
Returns the step size. Edit on GitHub
SliderPackData.getStepSize()
getValue
Returns the value at the given position. Edit on GitHub
SliderPackData.getValue(int index)
linkTo
Links the sliderpack to the other slider pack. Edit on GitHub
SliderPackData.linkTo(var other)
setAllValues
Sets all values. Edit on GitHub
SliderPackData.setAllValues(var value)
setAllValuesWithUndo
Sets all values with an undo operation. Edit on GitHub
SliderPackData.setAllValuesWithUndo(var value)
setAssignIsUndoable
Enables undo support for []-operator assignments. Edit on GitHub
SliderPackData.setAssignIsUndoable(bool shouldBeUndoable)
setContentCallback
Sets a callback that is being executed when a point is added / removed / changed. Edit on GitHub
SliderPackData.setContentCallback(var contentFunction)
setDisplayCallback
Sets a callback that is being executed when the ruler position changes. Edit on GitHub
SliderPackData.setDisplayCallback(var displayFunction)
setNumSliders
Sets the amount of sliders. Edit on GitHub
SliderPackData.setNumSliders(var numSliders)
setRange
Sets the range. Edit on GitHub
SliderPackData.setRange(double minValue, double maxValue, double stepSize)
setUsePreallocatedLength
Sets a preallocated length that will retain values when the slider pack is resized below that limit. Edit on GitHub
SliderPackData.setUsePreallocatedLength(int length)
setValue
Sets the value at the given position. Edit on GitHub
SliderPackData.setValue(int sliderIndex, float value)
setValueWithUndo
Sets a single value at the given position with undo support. Edit on GitHub
SliderPackData.setValueWithUndo(int sliderIndex, float value)
toBase64
Exports the data to a B64 string. Edit on GitHub
SliderPackData.toBase64()