UISystem. UISlider

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

Constructor

new UISlider(posopt, sizeopt, valueopt, textopt, coloropt, handleColoropt)

Create a UISlider object

Parameters:
NameTypeAttributesDefaultDescription
posVector2<optional>
sizeVector2<optional>
valuenumber<optional>
0.5
textstring<optional>
colorColor<optional>
uiSystem.defaultButtonColor
handleColorColor<optional>
WHITE

Extends

  • UIObject

Members

fillMode

Properties
TypeDescription
boolean

Should it fill up like a progress bar?

handleColor

Properties
TypeDescription
Color

Color for the handle part of the slider

handleSlice :TileSlice|undefined

Type:
  • TileSlice | undefined
Properties
TypeDescription
TileSlice | undefined

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

value

Properties
TypeDescription
number

Current percentage value of this slider 0-1

Methods

drawHandle(pos, size, color)

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

Parameters:
NameTypeDescription
posVector2
sizeVector2
colorColor