Minor changes for classic

This commit is contained in:
rilgamon 2021-04-03 15:11:06 +02:00
parent 0afcc64c4a
commit 06ed01752b
4 changed files with 13 additions and 6 deletions

View File

@ -41,6 +41,10 @@ child:AddEvent(events)
local init = {
Setup = function(self)
db = child['db']
if(not db["CraftTipScale"]) then
db["CraftTipScale"] = 0.9
end
craftTip:SetScale(db["CraftTipScale"])
end
}
addon.RegisterCallback(init, format("Init%s", childName), 'Setup')

View File

@ -72,9 +72,11 @@ child['specs'] = {
['bagsToggle'] = true,
['bankToggle'] = true,
['charToggle'] = true,
['mailToggle'] = true,
['bagsTooltip'] = true,
['bankTooltip'] = true,
['charTooltip'] = true,
['mailTooltip'] = true,
['showID'] = true,
['icons'] = {},
['names'] = {},

View File

@ -173,14 +173,19 @@ function modul:Delete(id, typ)
self['db'][id] = nil
end
end
local skipClassic = {
['PLAYERREAGENTBANKSLOTS_CHANGED'] = true
}
function modul:Enable()
self['status'] = true
local list = {}
for event,func in pairs(events) do
list[#list+1] = event
if(not child:IsClassic() or (child:IsClassic() and not skipClassic[event])) then
list[#list+1] = event
end
end
for i = 1, #list do
self['frame']:RegisterEvent(list[i])
self['frame']:RegisterEvent(list[i])
end
self['frame']:SetScript("OnEvent", OnEvent)
end

View File

@ -18,10 +18,6 @@ local function setup()
config:AddConfigEntry(main, "showID", "toggle", L['pref_itemid_header'], L['pref_itemid_desc'], 1, nil, true)
if(child:IsClassic()) then
if(not db["CraftTipScale"]) then
db["CraftTipScale"] = 0.9
end
craftTip:SetScale(db["CraftTipScale"])
local ct = config:AddConfigEntry(main,"CraftTip","group",L['pref_crafttip_header'],L['pref_crafttip_desc'],3, nil, true)
config:AddConfigEntry(ct, "donthookCraftFrame", "toggle", L['pref_donthookCraftFrame_header'], L['pref_donthookCraftFrame_desc'],1)
config:AddConfigEntry(ct, "CraftTipScale", "range", L['pref_crafttipscale_header'], L['pref_crafttipscale_desc'], 2, 0.01, 1, .01)