Skip to content
Angelo Geels edited this page May 3, 2015 · 2 revisions

Shows different kind of alerts.

Functions

  • alerts:info(string) Show an alert with the "info" icon.
  • alerts:error(string) Show an alert with the "error" icon.
  • alerts:warning(string) Show an alert with the "warning" icon.
  • alerts:isyes(string) Show an alert with the "question" icon, and a "yes" and "no" button. Returns true if user clicked on "yes".
  • alerts:isyeswarning(string) Show an alert with the "warning" icon, and a "yes" and "no" button. Returns true if user clicked on "yes".
  • alerts:isno(string) Show an alert with the "question" icon, and a "yes" and "no" button. Returns true if user clicked on "no".
  • alerts:isnowarning(string) Show an alert with the "warning" icon, and a "yes" and "no" button. Returns true if user clicked on "no".

Permissions

This library does not require any permissions.

Example

if alerts:isno('Are you sure you want to close?') then
  return
end

Clone this wiki locally