Class ccs.Slider
- Defined in: UISlider.js
- Extends ccs.Widget
Constructor Attributes | Constructor Name and Description |
---|---|
Base class for ccs.Slider
|
Method Summary
Class Detail
ccs.Slider()
Base class for ccs.Slider
Method Detail
-
addEventListenerSlider(selector, target)add event listener
- Parameters:
- {Function} selector
- {Object} target
-
allocates and initializes a UISlider.
// example var uiSlider = ccs.Slider.create();
- Returns:
- {ccs.Slider}
-
{cc.Size} getContentSize()override "getContentSize" method of widget.
- Returns:
- {cc.Size}
-
{string} getDescription()Returns the "class name" of widget.
- Returns:
- {string}
-
{number} getPercent()Gets the progress direction of slider.
- Returns:
- {number}
-
{number} getPercentWithBallPos(px)get percent with ballPos
- Parameters:
- {cc.Point} px
- Returns:
- {number}
-
{cc.Node} getVirtualRenderer()override "getContentSize" method of widget.
- Returns:
- {cc.Node}
-
ignoreContentAdaptWithSize(ignore)override "ignoreContentAdaptWithSize" method of widget.
- Parameters:
- {Boolean} ignore
-
loadBarTexture(fileName, texType)Load texture for slider bar.
- Parameters:
- {String} fileName
- {ccs.TextureResType} texType
-
loadProgressBarTexture(fileName, texType)Load dark state texture for slider progress bar.
- Parameters:
- {String} fileName
- {ccs.TextureResType} texType
-
loadSlidBallTextureDisabled(disabled, texType)Load dark state texture for slider ball.
- Parameters:
- {String} disabled
- {ccs.TextureResType} texType
-
loadSlidBallTextureNormal(normal, texType)Load normal state texture for slider ball.
- Parameters:
- {String} normal
- {ccs.TextureResType} texType
-
loadSlidBallTexturePressed(pressed, texType)Load selected state texture for slider ball.
- Parameters:
- {String} pressed
- {ccs.TextureResType} texType
-
loadSlidBallTextures(normal, pressed, disabled, texType)Load textures for slider ball.
- Parameters:
- {String} normal
- {String} pressed
- {String} disabled
- {ccs.TextureResType} texType
-
setCapInsetProgressBarRebderer(capInsets)Sets capinsets for slider, if slider is using scale9 renderer.
- Parameters:
- {cc.Rect} capInsets
-
setCapInsets(capInsets)Sets capinsets for slider, if slider is using scale9 renderer.
- Parameters:
- {cc.Rect} capInsets
-
setCapInsetsBarRenderer(capInsets)Sets capinsets for slider, if slider is using scale9 renderer.
- Parameters:
- {cc.Rect} capInsets
-
setPercent(percent)Changes the progress direction of slider.
- Parameters:
- {number} percent
-
setScale9Enabled(able)Sets if slider is using scale9 renderer.
- Parameters:
- {Boolean} able