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 options
Object The options
Properties
Name Type Description name
String The component name
modal
Boolean If the alert i modal (false)
emotion
String The component name
title
String The component name
text
String The component name
-
addButton(button)
-
Adds a Button to the alert
Parameters:
Name Type Description button
hui.ui.Button The button to add
-
hide()
-
Hides the alert
-
setEmotion(emotion)
-
Sets the alert emotion
Parameters:
Name Type Description emotion
String Can be 'smile' or 'gasp'
-
setText(text)
-
Sets the alert text
Parameters:
Name Type Description text
String The new text
-
setTitle(text)
-
Sets the alert title
Parameters:
Name Type Description text
String The new title
-
show()
-
Shows the alert
-
update(options)
-
Updates multiple properties
Parameters:
Name Type Description options
Object Properties
Name Type Description title
String text
String emotion
String