diff --git a/toxicIRC.lua b/toxicIRC.lua
index 8f6db1e..7c7aa92 100644
--- a/toxicIRC.lua
+++ b/toxicIRC.lua
@@ -15,15 +15,15 @@ local optionsData = {
[1] = {
type = "colorpicker",
name = "Text Color",
- getFunc = function() return toxicIRCAddon.savedVariables.colors.r, toxicIRCAddon.savedVariables.colors.g, toxicIRCAddon.savedVariables.colors.b end,
+ getFunc = function() return toxicIRCAddon.savedVariables.colors.r, toxicIRCAddon.savedVariables.colors.g, toxicIRCAddon.savedVariables.colors.b, toxicIRCAddon.savedVariables.colors.a end,
-- setFunc = function(r,g,b,a) print(r,g,b) end,
- setFunc = function(r,g,b,a) toxicIRCAddon.savedVariables.colors.r=r, toxicIRCAddon.savedVariables.colors.g=g, toxicIRCAddon.savedVariables.colors.b=b end,
+ setFunc = function(r,g,b,a) toxicIRCAddon.savedVariables.colors.r=r, toxicIRCAddon.savedVariables.colors.g=g, toxicIRCAddon.savedVariables.colors.b=b, toxicIRCAddon.savedVariables.colors.a=a end,
tooltip = "Set the color of the text.",
width = "full",
- requiresReload = true, -- boolean, if set to true, the warning text will contain a notice that changes are only applied after an UI reload and any change to the value will make the "Apply Settings" button appear on the panel which will reload the UI when pressed (optional)
- -- default = {r = defaults.r, g = defaults.g, b = defaults.b, a = defaults.a}, --(optional) table of default color values (or default = defaultColor, where defaultColor is a table with keys of r, g, b[, a]) or a function that returns the color
- -- reference = "MyAddonColorpicker" -- unique global reference to control (optional)
+ requiresReload = true,
+ -- default = toxicIRCAddon.savedVariables.colors, --(optional) table of default color values (or default = defaultColor, where defaultColor is a table with keys of r, g, b[, a]) or a function that returns the color
+ -- reference = "ToxicIRCColorpicker" -- unique global reference to control (optional)
}
}
@@ -83,13 +83,14 @@ function toxicIRCAddon:Initialize()
colors = {
r = 1,
g = 1,
- b = 0
+ b = 0,
+ a = 1
}
}
self.savedVariables = ZO_SavedVars:New("toxicIRCSavedVariables", 1, nil, defaults)
- LAM:RegisterAddonPanel("MyAddonOptions", panelData)
- LAM:RegisterOptionControls("MyAddonOptions", optionsData)
+ LAM:RegisterAddonPanel("ToxicIRCOptions", panelData)
+ LAM:RegisterOptionControls("ToxicIRCOptions", optionsData)
end
function toxicIRCAddon.OnAddOnLoaded(event, addonName)