Skip to content

Skin Data

Val Voronov edited this page Feb 13, 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, optional
template = "anotherSkinID"

border

  • table, optional
    • color - table, optional
      • The default colour
    • offset - number, optional
      • Indicates how far the border is offset from or inset in the toast
    • size - number, optional
      • The size
    • texture - string, table, optional
      • The texture. 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, optional
    • color - table, optional
      • The default colour
    • flags - string, optional
      • Font flags that will be passed to :SetFont method as the third argument
    • shadow - boolean, optional
      • Toggles the text shadow
-- defaults
title = {
    color = {1, 0.82, 0},
    flags = "",
    shadow = true,
}

text

The lower text

  • table, optional
    • color - table, optional
      • The default colour
    • flags - string, optional
      • Font flags that will be passed to :SetFont method as the third argument
    • shadow - boolean, optional
      • Toggles the text shadow
-- defaults
text = {
    color = {1, 1, 1},
    flags = "",
    shadow = true,
}

bonus

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

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

dragon

The texture that is used as the legendary item indicator

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

icon

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

icon_border

  • table, optional
    • color - table, optional
      • The default colour
    • offset - number, optional
      • Indicates how far the border is offset from or inset in the icon
    • size - number, optional
      • The size
    • texture - string, table, optional
      • The texture. 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, optional
    • hidden - boolean, optional
      • If true, the texture will be permanently hidden
    • tex_coords - table, optional
      • Arguments passed to :SetTexCoord method
    • texture - string, table, optional
      • The texture. 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, optional
    • color - table, optional
      • The default colour
    • flags - string, optional
      • Font flags that will be passed to :SetFont method as the third argument
    • shadow - boolean, optional
      • Toggles the text shadow
-- defaults
icon_text_1 = {
    color = {1, 1, 1},
    flags = "THINOUTLINE",
    shadow = false,
}

icon_text_2

The icon's upper text

  • table, optional
    • color - table, optional
      • The default colour
    • flags - string, optional
      • Font flags that will be passed to :SetFont method as the third argument
    • shadow - boolean, optional
      • Toggles the text shadow
-- defaults
icon_text_2 = {
    color = {1, 1, 1},
    flags = "THINOUTLINE",
    shadow = false,
}

skull

The texture that is used as the heroic difficulty indicator

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

slot

The small frames that are used to display additional rewards

  • table, optional
    • mask - string, optional
      • The mask applied to the slot's icon
    • tex_coords - table, optional
      • Arguments passed to :SetTexCoord method of the slot's icon
    • texture - string, optional
      • The border texture
-- defaults
slot = {
    mask = "Interface\\CHARACTERFRAME\\TempPortraitAlphaMaskSmall",
    tex_coords = {28 / 128, 100 / 128, 28 / 128, 100 / 128},
    texture = "Interface\\AddOns\\ls_Toasts\\assets\\slot-border",
},

bg

The background texture

  • table, optional
    • alliance - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • archaeology - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • collection - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • default - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • dungeon - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • horde - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • legendary - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • legion - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • recipe - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • store - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • transmog - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • upgrade - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
    • worldquest - table, optional
      • texture - string, table, optional
        • The texture. A string will be passed to :SetTexture method, a table will be unpacked and passed to :SetColorTexture method
-- defaults
bg = {
    alliance = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-alliance",
    },
    archaeology = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-archaeology",
    },
    collection = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-collection",
    },
    default = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-default",
    },
    dungeon = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-dungeon",
    },
    horde = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-horde",
    },
    legendary = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-legendary",
    },
    legion = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-legion",
    },
    recipe = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-recipe",
    },
    store = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-store",
    },
    transmog = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-transmog",
    },
    upgrade = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-upgrade",
    },
    worldquest = {
        texture = "Interface\\AddOns\\ls_Toasts\\assets\\toast-bg-worldquest",
    },
}

Wiki Home

Skins
  ▸ Skin API
  ▸ Skin Data

Links
  ▸ Curse
  ▸ Wow Interface

Clone this wiki locally