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.
SliderPackData.fromBase64( String b64)
getCurrentlyDisplayedIndex
Returns the currently displayed slider index.
SliderPackData.getCurrentlyDisplayedIndex()
getDataAsBuffer
Returns a Buffer object containing all slider values (as reference).
SliderPackData.getDataAsBuffer()
getNumSliders
Returns the amount of sliders.
SliderPackData.getNumSliders()
getStepSize
Returns the step size.
SliderPackData.getStepSize()
getValue
Returns the value at the given position.
SliderPackData.getValue(int index)
linkTo
Links the sliderpack to the other slider pack.
SliderPackData.linkTo(var other)
setAllValues
Sets all values.
SliderPackData.setAllValues(var value)
setAllValuesWithUndo
Sets all values with an undo operation.
SliderPackData.setAllValuesWithUndo(var value)
setAssignIsUndoable
Enables undo support for []-operator assignments.
SliderPackData.setAssignIsUndoable(bool shouldBeUndoable)
setContentCallback
Sets a callback that is being executed when a point is added / removed / changed.
SliderPackData.setContentCallback(var contentFunction)
setDisplayCallback
Sets a callback that is being executed when the ruler position changes.
SliderPackData.setDisplayCallback(var displayFunction)
setNumSliders
Sets the amount of sliders.
SliderPackData.setNumSliders(var numSliders)
setRange
Sets the range.
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.
SliderPackData.setUsePreallocatedLength(int length)
setValue
Sets the value at the given position.
SliderPackData.setValue(int sliderIndex, float value)
setValueWithUndo
Sets a single value at the given position with undo support.
SliderPackData.setValueWithUndo(int sliderIndex, float value)
toBase64
Exports the data to a B64 string.
SliderPackData.toBase64()