-
Notifications
You must be signed in to change notification settings - Fork 19
toasts
Lemonymous edited this page Aug 10, 2021
·
1 revision
A toast is what is shown in the top right corner when an achievement is completed.
Most of the functions in modApi.toasts are for internal use. The only public function is add.
void modApi.toasts:add(achievement)
| Argument name | Type | Description |
|---|---|---|
achievement |
table | A table with fields describing the toast to play |
When an achievement is completed, it will play a toast with itself as the argument.
Toasts can be played without having an achievement as well. When doing so, you simply pass a table to this function. This table has no required fields, but has the following optional fields:
| Field | Type | Description |
|---|---|---|
title |
string | Replaces the "Achievement!" title |
name |
string | Displayed name of the toast |
tooltip |
string | Displayed tooltip when hovered |
image |
string | Path to the toats's displayed image |