-
Notifications
You must be signed in to change notification settings - Fork 3
Skin Data
Every skin is defined by a table that contains skin's name, ID of a skin that should be used as a template and references to the toast's regions and their properties.
Here's an example of a skin table with all the possible entries.
local skinTable = {
name = "skinName",
template = "anotherSkinID",
border = {...},
title = {...},
text = {...},
bonus = {...},
dragon = {...},
icon = {...},
icon_border = {...},
icon_highlight = {...},
icon_text_1 = {...},
icon_text_2 = {...},
skull = {...},
slot = {...},
bg = {...},
},
}
The only mandatory field is name
. template
, if not defined or another skin's ID is invalid, will be set to "default", which means that the default skin will be used as the template. Other entries, if not defined, will be copied from the template skin table.
-
string
, required
name = "skinName"
The ID of a skin that should be used as a template. Defaults to "default"
string
template = "anotherSkinID"
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
offset -
number
- Indicates how far the border is offset from or inset in the toast
-
size -
number
- The size
-
texture -
string
,table
- A string will be passed to
:SetTexture
method, a table will be unpacked and passed to:SetColorTexture
method
- A string will be passed to
-
color -
-- defaults
border = {
color = {1, 1, 1},
offset = -6,
size = 16,
texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-border",
}
The upper text
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
flags -
string
- Font flags that will be passed to
:SetFont
method as the third argument
- Font flags that will be passed to
-
shadow -
boolean
- If true, the text shadow will be enabled
-
color -
-- defaults
title = {
color = {1, 0.82, 0},
flags = "",
shadow = true,
}
The lower text
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
flags -
string
- Font flags that will be passed to
:SetFont
method as the third argument
- Font flags that will be passed to
-
shadow -
boolean
- If true, the text shadow will be enabled
-
color -
-- defaults
text = {
color = {1, 1, 1},
flags = "",
shadow = true,
}
The texture that is used as the bonus completion indicator in scenarios
-
table
-
hidden -
boolean
- If true, the texture will be permanently hidden
-
hidden -
-- defaults
bonus = {
hidden = false,
}
The texture that is used as the legendary item indicator
-
table
-
hidden -
boolean
- If true, the texture will be permanently hidden
-
hidden -
-- defaults
dragon = {
hidden = false,
}
-
table
-
tex_coords -
table
- Arguments passed to
:SetTexCoord
method
- Arguments passed to
-
tex_coords -
-- defaults
icon = {
tex_coords = {4 / 64, 60 / 64, 4 / 64, 60 / 64},
}
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
offset -
number
- Indicates how far the border is offset from or inset in the icon
-
size -
number
- The size
-
texture -
string
,table
- A string will be passed to
:SetTexture
method, a table will be unpacked and passed to:SetColorTexture
method
- A string will be passed to
-
color -
-- defaults
icon_border = {
color = {1, 1, 1},
offset = -4,
size = 16,
texture = "Interface\\AddOns\\ls_Toasts\\assets\\icon-border",
}
The texture that is used as the quest item indicator
-
table
-
hidden -
boolean
- If true, the texture will be permanently hidden
-
tex_coords -
table
- Arguments passed to
:SetTexCoord
method
- Arguments passed to
-
texture -
string
,table
- A string will be passed to
:SetTexture
method, a table will be unpacked and passed to:SetColorTexture
method
- A string will be passed to
-
hidden -
-- defaults
icon_highlight = {
hidden = false,
tex_coords = {4 / 64, 60 / 64, 4 / 64, 60 / 64},
texture = "Interface\\ContainerFrame\\UI-Icon-QuestBorder",
}
The icon's lower text
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
flags -
string
- Font flags that will be passed to
:SetFont
method as the third argument
- Font flags that will be passed to
-
shadow -
boolean
- If true, the text shadow will be enabled
-
color -
-- defaults
icon_text_1 = {
color = {1, 1, 1},
flags = "THINOUTLINE",
shadow = false,
}
The icon's upper text
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
flags -
string
- Font flags that will be passed to
:SetFont
method as the third argument
- Font flags that will be passed to
-
shadow -
boolean
- If true, the text shadow will be enabled
-
color -
-- defaults
icon_text_2 = {
color = {1, 1, 1},
flags = "THINOUTLINE",
shadow = false,
}
The texture that is used as the heroic difficulty indicator
-
table
-
hidden -
boolean
- If true, the texture will be permanently hidden
-
hidden -
-- defaults
skull = {
hidden = false,
}
The small frames that are used to display additional rewards
-
table
-
tex_coords -
table
- Arguments passed to
:SetTexCoord
method of the slot's icon
- Arguments passed to
-
tex_coords -
-- defaults
slot = {
tex_coords = {4 / 64, 60 / 64, 4 / 64, 60 / 64}
},
The slot frame's border texture
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
offset -
number
- Indicates how far the border is offset from or inset in the toast
-
size -
number
- The size
-
texture -
string
,table
- A string will be passed to
:SetTexture
method, a table will be unpacked and passed to:SetColorTexture
method
- A string will be passed to
-
color -
-- defaults
slot_border = {
color = {1, 1, 1},
offset = -4,
size = 16,
texture = "Interface\\AddOns\\ls_Toasts\\assets\\icon-border",
},
The glow texture that flashes when the toast appears on the screen
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
texture -
string
,table
- A string will be passed to
:SetTexture
method, a table will be unpacked and passed to:SetColorTexture
method
- A string will be passed to
-
tex_coords -
table
- Arguments passed to
:SetTexCoord
method
- Arguments passed to
-
size -
table
- A table will be unpacked and passed to
:SetSize
method
- A table will be unpacked and passed to
-
point -
table
- Arguments passed to
:SetPoint
method -
p -
string
- The point of the texture
-
rP -
string
- The point of the toast
-
x -
number
- The x-offset
-
y -
number
- The y-offset
- Arguments passed to
-
color -
-- defaults
glow = {
color = {1, 1, 1},
texture = "Interface\\AchievementFrame\\UI-Achievement-Alert-Glow",
tex_coords = {5 / 512, 395 / 512, 5 / 256, 167 / 256},
size = {318, 152},
point = {
p = "CENTER",
rP = "CENTER",
x = 0,
y = 0,
},
},
The texture that slides from left to right when the toast appears on the screen
-
table
-
color -
table
- Arguments passed to
:SetVertexColor
method
- Arguments passed to
-
texture -
string
,table
- A string will be passed to
:SetTexture
method, a table will be unpacked and passed to:SetColorTexture
method
- A string will be passed to
-
tex_coords -
table
- Arguments passed to
:SetTexCoord
method
- Arguments passed to
-
size -
table
- A table will be unpacked and passed to
:SetSize
method
- A table will be unpacked and passed to
-
point -
table
- Arguments passed to
:SetPoint
method -
p -
string
- The point of the texture
-
rP -
string
- The point of the toast
-
x -
number
- The x-offset
-
y -
number
- The y-offset
- Arguments passed to
-
color -
-- defaults
shine = {
color = {1, 1, 1},
texture = "Interface\\AchievementFrame\\UI-Achievement-Alert-Glow",
tex_coords = {403 / 512, 465 / 512, 14 / 256, 62 / 256},
size = {66, 52},
point = {
p = "BOTTOMLEFT",
rP = "BOTTOMLEFT",
x = 0,
y = -2,
},
},
The background texture
-
table
-
default -
table
-
color -
table
- The default colour
-
texture -
string
,table
- A string will be passed to
:SetTexture
method, a table will be unpacked and passed to:SetColorTexture
method
- A string will be passed to
-
tex_coords -
table
- Arguments passed to
:SetTexCoord
method
- Arguments passed to
-
tile -
boolean
- If true, texture tiling will be enabled
-
color -
-
default -
-- defaults
bg = {
default = {
color = {1, 1, 1},
texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-default",
tex_coords = {1 / 512, 449 / 512, 1 / 128, 97 / 128},
tile = false,
},
}