Class cc.ControlSlider

Class Summary
Constructor Attributes Constructor Name and Description
 
ControlSlider: Slider ui component.

Method Summary

Class Detail

cc.ControlSlider()
ControlSlider: Slider ui component.

Field Detail

{cc.Sprite} backgroundSprite
- <@readonly> The overlay sprite
{Number} maxAllowedValue
- The maximum allowed value of the slider
{Number} maxValue
- The maximum value of the slider
{Number} minAllowedValue
- The minimum allowed value of the slider
{Number} minValue
- The minimum value of the slider
{cc.Sprite} progressSprite
- <@readonly> The background sprite
{Number} thumbSprite
- <@readonly> Brightness value of the picker
{Number} value
- The value of the slider

Method Detail

  • <static> cc.ControlSlider.create(bgFile, progressFile, thumbFile)
    Creates a slider with a given background sprite and a progress bar and a thumb item.
    Parameters:
    bgFile
    progressFile
    thumbFile
    See:
    cc.ControlSlider
  • initWithSprites(backgroundSprite, progressSprite, thumbSprite)
    Initializes a slider with a background sprite, a progress bar and a thumb item.
    Parameters:
    {cc.Sprite} backgroundSprite
    CCSprite, that is used as a background.
    {cc.Sprite} progressSprite
    CCSprite, that is used as a progress bar.
    {cc.Sprite} thumbSprite
    CCMenuItem, that is used as a thumb.
  • valueForLocation(location)
    Returns the value for the given location.
    Parameters:
    location