Creates an instance of a Slider.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
optional
An options object to specify to style and behaviour of the slider.
|
- See:
Example
// Create the app
const app = new PIXIApp({
view: canvas,
width: 900,
height: 250
}).setup().run()
// Create the slider
const slider = new Slider({
x: 10,
y: 20
})
// Add the slider to a DisplayObject
app.scene.addChild(slider)
Extends
- PIXI.Container
Members
-
Gets or sets the disabled state. When disabled, the slider cannot be clicked.
-
Gets or sets the value.
Methods
-
hide ()Slider
-
Hides the slider (sets his alpha values to 1).
Returns:
Type Description Slider A reference to the slider for chaining. -
layout ()Slider
-
Should be called to refresh the layout of the slider. Can be used after resizing.
Returns:
Type Description Slider A reference to the slider for chaining. -
show ()Slider
-
Shows the slider (sets his alpha values to 1).
Returns:
Type Description Slider A reference to the slider for chaining.