-
Notifications
You must be signed in to change notification settings - Fork 3
Skin API
Val Voronov edited this page Feb 14, 2018
·
1 revision
ls: Toasts provides :RegisterSkin
method that allows add-on developers to register their own skins with the add-on
-
skinID -
string
, required- It's used to identify skins internally, other skins can use IDs for template references
-
skinData -
table
, required- For more info, read this page
Here's an example of two skins being registered, the latter is using the former as its template.
ls_Toasts[1]:RegisterSkin("test-skin", {
name = "Test Skin",
border = {
color = {0, 0, 0},
offset = 0,
size = 2,
texture = {1, 1, 1, 0.6},
},
icon_border = {
color = {0, 0, 0},
offset = 0,
size = 2,
texture = {1, 1, 1, 0.6},
},
})
ls_Toasts[1]:RegisterSkin("test-skin-modified", {
name = "Test Skin (Modified)",
template = "test-skin",
border = {
color = {1, 1, 1},
},
icon_border = {
color = {1, 1, 1},
},
})