Alert Dialog
`alertDialog(data)` → `'confirm'|'cancel'`
Blocking. Shows a modal alert and waits for the player to dismiss it.
| Field | Type | Default | Description |
|---|---|---|---|
header |
string |
— | Dialog title |
content |
string |
— | Body text (supports markdown) |
cancel |
boolean |
false |
Show a cancel button |
centered |
boolean |
false |
Center the dialog text |
size |
string |
'md' |
'sm', 'md', 'lg', 'xl' |
overflow |
boolean |
false |
Allow content to scroll |
labels.confirm |
string |
'OK' |
Confirm button label |
labels.cancel |
string |
'Cancel' |
Cancel button label |
local result = exports['amzn_uikit']:alertDialog({
header = 'Are you sure?',
content = 'This action cannot be undone.',
cancel = true,
})
if result == 'confirm' then
-- confirmed
end`closeAlertDialog()`
Closes the active alert dialog programmatically (resolves as 'cancel').
Previews
GLASS
