18 lines
823 B
Lua
18 lines
823 B
Lua
|
local _, addon = ...
|
||
|
local childName = addon['childName']
|
||
|
local child = addon[childName]
|
||
|
local L = LibStub("AceLocale-3.0"):GetLocale(childName, true)
|
||
|
function child:PrefChanged()
|
||
|
child:switchDisplay(child['db']['garrisonHideCombat'])
|
||
|
end
|
||
|
local init = {
|
||
|
Setup = function()
|
||
|
local config = LibStub:GetLibrary("zzConfig")
|
||
|
local options = child['options']
|
||
|
local main = options['args'][childName]
|
||
|
config:AddConfigEntry(main,'garrisonHideCombat','toggle',L["Hide Alert"],L["Hide mission complete alert"],1)
|
||
|
config:AddConfigEntry(main,'hideStandard','toggle',L["Hide Blizzard"],L["Hide Blizzards default garrison button"],2)
|
||
|
config:AddConfigEntry(main,'garrisonText','input',L["Display Text"],L["Display Text description"],3)
|
||
|
end
|
||
|
}
|
||
|
addon.RegisterCallback(init, format("Init%s", childName), 'Setup')
|