LittleJS 1.27.0

UISystem

UISlider

UISlider - A UI object that acts as a slider or scrollbar

Extends UIObject

Constructor

new UISlider(pos, size, value, text, color, handleColor)uiSystem.js:1648

Create a UISlider object

pos Vector2 optional
size Vector2 optional
value number optional, default 0.5
text string optional
color Color optional, default uiSystem.defaultButtonColor
handleColor Color optional, default WHITE

Members

Methods

Inherited from UIObject

Members

fillMode : booleanuiSystem.js:1676

Should it fill up like a progress bar?

handleColor : ColoruiSystem.js:1670

Color for the handle part of the slider

handleSlice : TileSlice|undefineduiSystem.js:1674

Style to draw the handle, or the fill, with; undefined for the slider's own slice, or a rectangle when it has none

value : numberuiSystem.js:1668

Current percentage value of this slider 0-1

Methods

drawHandle(pos, size, color)uiSystem.js:1723

Draw the handle, or the fill of a fill mode slider, with the handle slice, the slider's own, or a rectangle

pos Vector2
size Vector2
color Color