Skip to content

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

:RegisterSkin(skinID, skinData)

Arguments

  • skinID - string, required

    • It's used to identify skins internally, other skins can use IDs for template references
  • skinData - table, required

Usage

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},
  },
})

Wiki Home

Skins
  ▸ Skin API
  ▸ Skin Data

Links
  ▸ Curse
  ▸ Wow Interface

Clone this wiki locally