end |
db['version'] = curVersion |
end |
local function ldbOnClick(self, button) |
if(button == "LeftButton" and IsControlKeyDown()) then |
reset() |
elseif(IsShiftKeyDown() and button == "LeftButton") then |
addon['db']['global']['ldbicons'][childName]['hide'] = not addon['db']['global']['ldbicons'][childName]['hide'] |
if(ldbicon) then |
if(addon['db']['global']['ldbicons'][childName]['hide']) then |
ldbicon:Hide(childName) |
else |
ldbicon:Show(childName) |
end |
end |
elseif(button == "LeftButton") then |
if(InterfaceOptionsFrame:IsVisible() and not InCombatLockdown()) then |
InterfaceOptionsFrame:Hide() |
else |
InterfaceOptionsFrame_OpenToCategory(childName) |
end |
end |
end |
local function init() |
addon['options'] = addon['InitConfig'](addon, childName, true, { |
['name'] = childName, |
['type'] = "launcher", |
['icon'] = "Interface\\Icons\\ability_monk_roll", |
['OnTooltipShow'] = OnTooltip, |
['OnClick'] = ldbOnClick, |
}, getPref,setPref) |
db = addon['db']['profile'][childName] |
if(db['sha']) then |