Class: Alert

hui.ui. Alert


new Alert(options)

An alert

Parameters:
Name Type Description
options Object

The options

Properties
Name Type Description
element Element

The DOM node

name String

The component name

modal Boolean

If the alert i modal (false)

Source:

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

Source:

addButton(button)

Adds a Button to the alert

Parameters:
Name Type Description
button hui.ui.Button

The button to add

Source:

hide()

Hides the alert

Source:

setEmotion(emotion)

Sets the alert emotion

Parameters:
Name Type Description
emotion String

Can be 'smile' or 'gasp'

Source:

setText(text)

Sets the alert text

Parameters:
Name Type Description
text String

The new text

Source:

setTitle(text)

Sets the alert title

Parameters:
Name Type Description
text String

The new title

Source:

show()

Shows the alert

Source:

update(options)

Updates multiple properties

Parameters:
Name Type Description
options Object
Properties
Name Type Description
title String
text String
emotion String
Source: