Creates a ProgressBar.
Name | Type | Attributes | Description |
---|---|---|---|
options |
ProgressBarOptions |
<optional> |
Options. |
options.bg |
Sprite | Graphics | string |
Background of the ProgressBar. |
|
options.fill |
Sprite | Graphics | string |
Fill of the ProgressBar. |
|
options.fillPaddings |
FillPaddings |
Fill offsets. |
|
options.fillPaddings.top |
number |
Fill top offset. |
|
options.fillPaddings.right |
number |
Fill right offset. |
|
options.fillPaddings.bottom |
number |
Fill bottom offset. |
|
options.fillPaddings.left |
number |
Fill left offset. |
|
options.nineSliceSprite |
NineSliceSprite |
NineSliceSprite values for bg and fill. |
|
options.nineSliceSprite.bg |
Array |
NineSliceSprite config for bg ([number, number, number, number]). |
|
options.nineSliceSprite.fill |
Array |
NineSliceSprite config fill ([number, number, number, number]). |
|
options.progress |
number |
Initial progress value. |
Example
new ProgressBar({
bg: 'slider_bg.png',
fill: 'slider.png',
progress: 50,
});
Extends
- Container
Members
Sets height of a ProgressBars background and fill. If nineSliceSprite is set, then height will be set to nineSliceSprite. If nineSliceSprite is not set, then height will control components height as Container.
Gets height of a ProgressBar.
Container, that holds all inner views.
Set current progress percentage value.
Return current progress percentage value.
Sets width of a ProgressBars background and fill. If nineSliceSprite is set, then width will be set to nineSliceSprite. If nineSliceSprite is not set, then width will control components width as Container.
Gets width of a ProgressBar.
Container, given as a constructor parameter that is a button view.
Methods
Initialize ProgressBar.
Name | Type | Description |
---|---|---|
root0 |
ProgressBarOptions | |
root0.bg |
Background texture. |
|
root0.fill |
Fill texture. |
|
root0.fillPaddings |
Fill offset. |
|
root0.progress |
Initial progress value. |
Set bg.
Name | Type | Description |
---|---|---|
bg |
ProgressBarViewType |
Set fill.
Name | Type | Attributes | Description |
---|---|---|---|
fill |
ProgressBarViewType | ||
fillPadding |
FillPaddings |
<optional> |