forked from Jibo-Revival-Group/JiboOs
112 lines
3.2 KiB
JavaScript
112 lines
3.2 KiB
JavaScript
/**
|
|
* @typedef jibo.face.views.ListProgress~ListProgressOptions
|
|
* @description Interface - Configuration values for creating a ListProgress.
|
|
* @prop {number} [width] - Value for the desired width of the component.
|
|
* @prop {number} [height] - Value for the desired height of the component.
|
|
* @prop {number} [backgroundColor] - Background color value.
|
|
* @prop {number} [progressColor] - Progress color value.
|
|
* @prop {Object} [position] - An object with 'x' and 'y' properties.
|
|
*/
|
|
|
|
/**
|
|
* Indicate current position (page) while navigating in MenuView.
|
|
*
|
|
* @class ListProgress
|
|
* @extends jibo.face.views.Element
|
|
* @memberof jibo.face.views
|
|
*/
|
|
|
|
/**
|
|
* Default value for WIDTH of the component.
|
|
* @name jibo.face.views.ListProgress.DEFAULT_WIDTH
|
|
* @type {number}
|
|
* @readOnly
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Default value for HEIGHT of the component.
|
|
* @name jibo.face.views.ListProgress.DEFAULT_HEIGHT
|
|
* @type {number}
|
|
* @readOnly
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Default value for backgroundColor of the component.
|
|
* @name jibo.face.views.ListProgress.BACKGROUND_COLOR
|
|
* @type {number}
|
|
* @readOnly
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Default value for progressColor of the component.
|
|
* @name jibo.face.views.ListProgress.PROGRESS_COLOR
|
|
* @type {number}
|
|
* @readOnly
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Set of options which are used to specify position, size and look of progress bar
|
|
* @name jibo.face.views.ListProgress#_listProgressOptions
|
|
* @type {jibo.face.views.ListProgress~ListProgressOptions}
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Graphics instance that represents progress bar
|
|
* @name jibo.face.views.ListProgress#_progressDisplay
|
|
* @type {PIXI.Graphics}
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Graphics instance that represents background
|
|
* @name jibo.face.views.ListProgress#_backgroundDisplay
|
|
* @type {PIXI.Graphics}
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Last passed-in page index from MenuView
|
|
* @name jibo.face.views.ListProgress#_pageIndex
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Last passed-in pages count from MenuView
|
|
* @name jibo.face.views.ListProgress#_pagesCount
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* The radius of the round corner to be drawn on the left and right of the progress bar
|
|
* @name jibo.face.views.ListProgress#_cornerRadius
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Set up the display.
|
|
* Assign assets, set timelines, etc.
|
|
* @method jibo.face.views.ListProgress#setupDisplay
|
|
* @param {Object} [assets] Object passed back from loader namespace load method,
|
|
* refer to {@link jibo.loader} for detail
|
|
*/
|
|
|
|
/**
|
|
* Updates progress position based on provided current page and pages quantity available in the MenuView
|
|
* @method jibo.face.views.ListProgress#updatePage
|
|
* @param {number} [pageIndex = -1] Index of the current page
|
|
* @param {number} [pagesCount = -1] Number of pages available in MenuView
|
|
*/
|
|
|
|
/**
|
|
* Retrieves the actual height of the component.
|
|
* @method jibo.face.views.ListProgress#getHeight
|
|
* @type {Number}
|
|
*/ |