Skip to main content
Version: v3

IMG_PROGRESS

Display the images sequentially according to the given order.

Create UI widget

const imgProgress = hmUI.createWidget(hmUI.widget.IMG_PROGRESS, Param)

Type

Param: object

PropertiesDescriptionRequiredType
xArray of x-coordinates of the images.YESarray
yArray of y-coordinates of the images.YESarray
image_arrayArray of imagesYESarray
image_lengthThe length of the array.YESnumber
levelProgress level [1-image_length].NOnumber

Code example

const xArray = [100, 200, 300]
const yArray = [100, 200, 300]
const imgArray = ['1.png', '2.png', '3.png']
const imgProgress = hmUI.createWidget(hmUI.widget.IMG_PROGRESS, {
x: xArray,
y: yArray,
image_array: imgArray,
image_length: 3,
level: 2 //level is 2.Draw the second picture.
})