Class ccui.LoadingBar
- Defined in: UILoadingBar.js
- Extends ccui.Widget
Constructor Attributes | Constructor Name and Description |
---|---|
Base class for ccui.LoadingBar
|
Method Summary
Class Detail
ccui.LoadingBar()
Base class for ccui.LoadingBar
Field Detail
{ccui.LoadingBar.TYPE_LEFT | ccui.LoadingBar.TYPE_RIGHT}
direction
- The progress direction of loadingbar
{Number}
percent
- The current progress of loadingbar
Method Detail
-
allocates and initializes a UILoadingBar.
// example var uiLoadingBar = ccui.LoadingBar.create();
- Returns:
- {ccui.LoadingBar}
-
{cc.Rect} getCapInsets()Get cap insets for loadingBar.
- Returns:
- {cc.Rect}
-
{cc.Size} getContentSize()override "getContentSize" method of widget.
- Returns:
- {cc.Size}
-
{string} getDescription()Returns the "class name" of widget.
- Returns:
- {string}
-
{ccui.LoadingBar.TYPE_LEFT | ccui.LoadingBar.TYPE_RIGHT} getDirection()Gets the progress direction of loadingbar. LoadingBarTypeLeft means progress left to right, LoadingBarTypeRight otherwise.
- Returns:
- {ccui.LoadingBar.TYPE_LEFT | ccui.LoadingBar.TYPE_RIGHT}
-
{number} getPercent()Gets the progress direction of loadingbar.
- Returns:
- {number}
-
{cc.Node} getVirtualRenderer()override "getContentSize" method of widget.
- Returns:
- {cc.Node}
-
ignoreContentAdaptWithSize(ignore)override "ignoreContentAdaptWithSize" method of widget.
- Parameters:
- {Boolean} ignore
-
{Boolean} isScale9Enabled()Get loadingBar is using scale9 renderer or not..
- Returns:
- {Boolean}
-
loadTexture(texture, texType)Load texture for loadingbar.
- Parameters:
- {String} texture
- {ccui.Widget.LOCAL_TEXTURE|ccui.Widget.PLIST_TEXTURE} texType
-
setCapInsets(capInsets)Sets capinsets for loadingbar, if loadingbar is using scale9 renderer.
- Parameters:
- {cc.Rect} capInsets
-
setDirection(dir)Changes the progress direction of loadingbar. LoadingBarTypeLeft means progress left to right, LoadingBarTypeRight otherwise.
- Parameters:
- {ccui.LoadingBar.TYPE_LEFT | ccui.LoadingBar.TYPE_RIGHT} dir
-
setPercent(percent)The current progress of loadingbar
- Parameters:
- {number} percent
-
setScale9Enabled(enabled)Sets if loadingbar is using scale9 renderer.
- Parameters:
- {Boolean} enabled