Page 1 of 1

Customize text displayed for editable components

Posted: 01 Jan 2024, 19:14
by toolsrme
Is there a way to customize the text that is displayed in the tips panel in the edit mode?

e.g. How to make the text associated with hmUI.edit_type.HEART say something other than "Heart Rate" in the example code:

Code: Select all

editGroup = hmUI.createWidget(hmUI.widget.WATCHFACE_EDIT_GROUP, {
  edit_id: 101,
  x: groupX,
  y: groupY,
  w: 148,
  h: 148,
  select_image: rootPath + 'mask/select.png',
  un_select_image: rootPath + 'mask/select.png',
  default_type: hmUI.edit_type.HEART,
  optional_types: [{ type: hmUI.edit_type.HEART, preview: rootPath + 'preview/bat.png' }],
  count: 1,
  tips_BG: rootPath + 'mask/text_tag.png',
  tips_x: 172 - groupX,
  tips_y: 210 - groupY,
  tips_width: 110,
  tips_margin: 10 // optional, default value: 0
})
Or is there a way to create your own custom types and use that instead of the built-in hmUI.edit_type's?