Skip to main content
Version: v1.0

hmUI.createWidget(widgetId, option)

Create UI widgets.

Type​

(widgetId: WIDGET_ID, option?: Option) => widget: WIDGET

Parameters​

ParameterDescriptionRequiredType
widgetIdThe ID of the widget to be created. (Reference WIDGET_ID)YES-
optionParameters.NO-
widgetThe instance of widget.--

WIDGET_ID​

ValueDescription
hmUI.widget.BUTTONButton widget ID.
IMG`Image widget ID.
...The rest of the values are not listed, refer to the widget directory.

WIDGET​

DescriptionType
Widget objectobject

Code examples​

Reference to a widget example.