new Alert(options)
An alert
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | The options Properties
|
Methods
-
<static> create(options)
-
Creates a new instance of an alert
Parameters:
Name Type Description optionsObject The options
Properties
Name Type Description nameString The component name
modalBoolean If the alert i modal (false)
emotionString The component name
titleString The component name
textString The component name
-
addButton(button)
-
Adds a Button to the alert
Parameters:
Name Type Description buttonhui.ui.Button The button to add
-
hide()
-
Hides the alert
-
setEmotion(emotion)
-
Sets the alert emotion
Parameters:
Name Type Description emotionString Can be 'smile' or 'gasp'
-
setText(text)
-
Sets the alert text
Parameters:
Name Type Description textString The new text
-
setTitle(text)
-
Sets the alert title
Parameters:
Name Type Description textString The new title
-
show()
-
Shows the alert
-
update(options)
-
Updates multiple properties
Parameters:
Name Type Description optionsObject Properties
Name Type Description titleString textString emotionString