用這個api就可以更換背景
在測試我是從
⬇️⬇️⬇️這邊⬇️⬇️⬇️找的
代码:
const editBg = hmUI.createWidget(hmUI.widget.WATCHFACE_EDIT_BG, {
edit_id: 103,
x: 0,
y: 0,
bg_config: [
{ id: 1, preview: 'images/bg_1.png', path: 'images/bg_1.png' },
{ id: 2, preview: 'images/bg_2.png', path: 'images/bg_2.png' },
{ id: 3, preview: 'images/bg_3.png', path: 'images/bg_3.png' },
{ id: 4, preview: 'images/bg_4.png', path: 'images/bg_4.png' },
{ id: 5, preview: 'images/bg_5.png', path: 'images/bg_5.png' }
],
count: 5,
default_id: 1,
fg: 'images/fg.png',
tips_x: 20,
tips_y: 350,
tips_bg: 'images/tips.png',
show_level:hmUI.show_level.ONLY_NORMAL | hmUI.show_level.ONLY_EDIT,
})
在測試我是從
⬇️⬇️⬇️這邊⬇️⬇️⬇️找的