Module flower.widget.Slider
This class is an slider that can be pressed and dragged.
Extends:
Info:
- Release: V3.0.0
- Author: Makoto
Functions
Slider:_initInternal () | Initializes the internal variables. |
Slider:_initEventListeners () | Initializes the event listener. |
Slider:_createChildren () | Create children. |
Slider:_createBackgroundImage () | Create the backgroundImage. |
Slider:_createProgressImage () | Create the progressImage. |
Slider:_createThumbImage () | Create the progressImage. |
Slider:updateDisplay () | Update the display. |
Slider:updateBackgroundImage () | Update the backgroundImage. |
Slider:updateProgressImage () | Update the progressImage. |
Slider:setValue (value) | Set the value of the current. |
Slider:getValue () | Return the value of the current. |
Slider:setBackgroundTexture (texture) | Sets the background texture. |
Slider:setProgressTexture (texture) | Sets the progress texture. |
Slider:setThumbTexture (texture) | Sets the thumb texture. |
Slider:setOnValueChanged (func) | Set the event listener that is called when the user click the Slider. |
Slider:doSlide (worldX) | Down the Slider. |
Slider:onTouchDown (e) | This event handler is called when you touch the Slider. |
Slider:onTouchUp (e) | This event handler is called when the Slider is released. |
Slider:onTouchMove (e) | This event handler is called when you move on the Slider. |
Slider:onTouchCancel (e) | This event handler is called when you cancel the touch. |
Fields
STYLE_BACKGROUND_TEXTURE | Style: backgroundTexture |
STYLE_PROGRESS_TEXTURE | Style: progressTexture |
STYLE_THUMB_TEXTURE | Style: thumbTexture |
EVENT_VALUE_CHANGED | Event: valueChanged |
Functions
- Slider:_initInternal ()
- Initializes the internal variables.
- Slider:_initEventListeners ()
- Initializes the event listener.
- Slider:_createChildren ()
- Create children.
- Slider:_createBackgroundImage ()
- Create the backgroundImage.
- Slider:_createProgressImage ()
- Create the progressImage.
- Slider:_createThumbImage ()
- Create the progressImage.
- Slider:updateDisplay ()
- Update the display.
- Slider:updateBackgroundImage ()
- Update the backgroundImage.
- Slider:updateProgressImage ()
- Update the progressImage.
- Slider:setValue (value)
-
Set the value of the current.
Parameters:
- value value of the current
- Slider:getValue ()
-
Return the value of the current.
Returns:
-
value of the current
- Slider:setBackgroundTexture (texture)
-
Sets the background texture.
Parameters:
- texture texture
- Slider:setProgressTexture (texture)
-
Sets the progress texture.
Parameters:
- texture texture
- Slider:setThumbTexture (texture)
-
Sets the thumb texture.
Parameters:
- texture texture
- Slider:setOnValueChanged (func)
-
Set the event listener that is called when the user click the Slider.
Parameters:
- func click event handler
- Slider:doSlide (worldX)
-
Down the Slider.
There is no need to call directly to the basic.
Parameters:
- worldX Touch worldX
- Slider:onTouchDown (e)
-
This event handler is called when you touch the Slider.
Parameters:
- e Touch Event
- Slider:onTouchUp (e)
-
This event handler is called when the Slider is released.
Parameters:
- e Touch Event
- Slider:onTouchMove (e)
-
This event handler is called when you move on the Slider.
Parameters:
- e Touch Event
- Slider:onTouchCancel (e)
-
This event handler is called when you cancel the touch.
Parameters:
- e Touch Event