hmUI.createWidget(widgetId, option)
Create UI widgets.
Type
(widgetId: WIDGET_ID, option?: Option) => widget: WIDGET
Parameters
Parameter | Description | Required | Type |
---|---|---|---|
widgetId | The ID of the component to be created. (Reference WIDGET_ID) | YES | - |
option | Parameters. | NO | - |
widget | The instance of component. | - | - |
WIDGET_ID
Value | Description |
---|---|
hmUI.widget.BUTTON | Button widget ID. |
IMG` | Image widget ID. |
... | The rest of the values are not listed, refer to the widget directory. |
WIDGET
Description | Type |
---|---|
Widget object | object |
Code examples
Reference to a widget example.