Skip to content

Skin Data

Val Voronov edited this page Sep 25, 2018 · 2 revisions

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.

The Basics

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.

The Details

name

  • string, required
name = "skinName"

template

The ID of a skin that should be used as a template. Defaults to "default"

  • string
template = "anotherSkinID"

border

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • 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
-- defaults
border = {
  color = {1, 1, 1},
  offset = -6,
  size = 16,
  texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-border",
}

title

The upper text

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • flags - string
      • Font flags that will be passed to :SetFont method as the third argument
    • shadow - boolean
      • If true, the text shadow will be enabled
-- defaults
title = {
    color = {1, 0.82, 0},
    flags = "",
    shadow = true,
}

text

The lower text

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • flags - string
      • Font flags that will be passed to :SetFont method as the third argument
    • shadow - boolean
      • If true, the text shadow will be enabled
-- defaults
text = {
    color = {1, 1, 1},
    flags = "",
    shadow = true,
}

bonus

The texture that is used as the bonus completion indicator in scenarios

  • table
    • hidden - boolean
      • If true, the texture will be permanently hidden
-- defaults
bonus = {
    hidden = false,
}

dragon

The texture that is used as the legendary item indicator

  • table
    • hidden - boolean
      • If true, the texture will be permanently hidden
-- defaults
dragon = {
    hidden = false,
}

icon

  • table
    • tex_coords - table
      • Arguments passed to :SetTexCoord method
-- defaults
icon = {
    tex_coords = {4 / 64, 60 / 64, 4 / 64, 60 / 64},
}

icon_border

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • 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
-- defaults
icon_border = {
  color = {1, 1, 1},
  offset = -4,
  size = 16,
  texture = "Interface\\AddOns\\ls_Toasts\\assets\\icon-border",
}

icon_highlight

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
    • texture - string, table
      • A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
-- defaults
icon_highlight = {
    hidden = false,
    tex_coords = {4 / 64, 60 / 64, 4 / 64, 60 / 64},
    texture = "Interface\\ContainerFrame\\UI-Icon-QuestBorder",
}

icon_text_1

The icon's lower text

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • flags - string
      • Font flags that will be passed to :SetFont method as the third argument
    • shadow - boolean
      • If true, the text shadow will be enabled
-- defaults
icon_text_1 = {
    color = {1, 1, 1},
    flags = "THINOUTLINE",
    shadow = false,
}

icon_text_2

The icon's upper text

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • flags - string
      • Font flags that will be passed to :SetFont method as the third argument
    • shadow - boolean
      • If true, the text shadow will be enabled
-- defaults
icon_text_2 = {
    color = {1, 1, 1},
    flags = "THINOUTLINE",
    shadow = false,
}

skull

The texture that is used as the heroic difficulty indicator

  • table
    • hidden - boolean
      • If true, the texture will be permanently hidden
-- defaults
skull = {
    hidden = false,
}

slot

The small frames that are used to display additional rewards

  • table
    • tex_coords - table
      • Arguments passed to :SetTexCoord method of the slot's icon
-- defaults
slot = {
    tex_coords = {4 / 64, 60 / 64, 4 / 64, 60 / 64}
},

slot_border

The slot frame's border texture

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • 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
-- defaults
slot_border = {
  color = {1, 1, 1},
  offset = -4,
  size = 16,
  texture = "Interface\\AddOns\\ls_Toasts\\assets\\icon-border",
},

glow

The glow texture that flashes when the toast appears on the screen

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • texture - string, table
      • A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • tex_coords - table
      • Arguments passed to :SetTexCoord method
    • size - table
      • A table will be unpacked and passed to :SetSize method
    • 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
-- 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,
  },
},

shine

The texture that slides from left to right when the toast appears on the screen

  • table
    • color - table
      • Arguments passed to :SetVertexColor method
    • texture - string, table
      • A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • tex_coords - table
      • Arguments passed to :SetTexCoord method
    • size - table
      • A table will be unpacked and passed to :SetSize method
    • 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
-- 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,
  },
},

bg

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
      • tex_coords - table
        • Arguments passed to :SetTexCoord method
      • tile - boolean
        • If true, texture tiling will be enabled
-- 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,
    },
}

Wiki Home

Skins
  ▸ Skin API
  ▸ Skin Data

Links
  ▸ Curse
  ▸ Wow Interface

Clone this wiki locally