WoWInterface SVN DotIt

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 19 to Rev 20
    Reverse comparison

Rev 19 → Rev 20

trunk/DotIt/config.lua
212,7 → 212,6
else
DotIt:UnregisterEvent("UNIT_TARGET")
end
 
end,
},
dots = {
248,9 → 247,63
bossmods = {
name = "Enable bossmods",
type = "toggle",
set = function(info, val) DotIt.db.profile.ebossmods = val
if not val then
DotItConfig.args.bossmods.args.hidebossmod.disabled = true
BigWigs:ToggleModuleActive("Bars", true)
else
DotItConfig.args.bossmods.args.hidebossmod.disabled = false
end
end,
get = function(info) return DotIt.db.profile.ebossmods end,
},
},
},
bossmods = {
name = "Bossmods",
type = "group",
order = 9999,
args = {
bossmods = {
name = "Enable bossmods",
type = "toggle",
set = function(info, val) DotIt.db.profile.ebossmods = val
if not val then
DotItConfig.args.bossmods.args.hidebossmod.disabled = true
if BigWigs and IsAddOnLoaded("BigWigs_Plugins") then
BigWigs:ToggleModuleActive("Bars", true)
end
else
DotItConfig.args.bossmods.args.hidebossmod.disabled = false
if DotIt.db.profile.hidebossmod then
if BigWigs and IsAddOnLoaded("BigWigs_Plugins") then
BigWigs:ToggleModuleActive("Bars", false)
end
end
end
end,
get = function(info) return DotIt.db.profile.ebossmods end,
},
hidebossmod = {
name = "Hide bossmod bars",
type = "toggle",
set = function(info, val)
DotIt.db.profile.hidebossmod = val
if not val then
if BigWigs and IsAddOnLoaded("BigWigs_Plugins") then
BigWigs:ToggleModuleActive("Bars", true)
end
else
if BigWigs and IsAddOnLoaded("BigWigs_Plugins") then
BigWigs:ToggleModuleActive("Bars", false)
end
end
 
end,
get = function(info) return DotIt.db.profile.hidebossmod end,
},
},
},
additionalscale = {
name = "Logarithmic scale",
type = "group",
trunk/DotIt/core.lua
90,7 → 90,7
return findFirstEmptyBar(init)
end
function DotIt:GetBarPos(uid, typ)
getBarPos(uid, typ)
return getBarPos(uid, typ)
end
local function isBarActive(info)
local bars = sb:GetBars()
trunk/DotIt/bossmods.lua
28,26 → 28,33
if DotIt.db.profile.ebossmods then
local color = getColor()
if string.find(id, "dummy") then return end -- should prevent this strange behavior
DotIt.sb:CreateBar(id, timer, 0, id, icon, 1, deepCopy(color), deepCopy(color), DotIt.db.profile.bartexture, function() DotIt:removeColor() end)
DotIt.sb:CreateBar(id, timer, 0, id, icon, DotIt:GetBarPos(0, "Bossmods"), deepCopy(color), deepCopy(color), DotIt.db.profile.bartexture, function() DotIt:removeColor() end)
if not DotIt.db.profile.hidebossmod then
DotIt.hooks[self]["CreateBar"](self, timer, id, icon, huge, small, color)
end
else
DotIt.hooks[self]["CreateBar"](self, timer, id, icon, huge, small, color)
end
end
local function bigwigs(self, id, dur, icon)
if DotIt.db.profile.ebossmods then
local color = getColor()
DotIt.sb:CreateBar(id, dur, 0, id, icon, 1, deepCopy(color), deepCopy(color), DotIt.db.profile.bartexture, function() DotIt:removeColor() end)
DotIt.sb:CreateBar(id, dur, 0, id, icon, DotIt:GetBarPos(0, "Bossmods"), deepCopy(color), deepCopy(color), DotIt.db.profile.bartexture, function() DotIt:removeColor() end)
end
end
function DotIt:ADDON_LOADED(self, addon)
if addon == "BigWigs_Plugins" then
DotIt:ScheduleTimer(function() BigWigs:ToggleModuleActive("Bars", false) end, 2)
if DotIt.db.profile.ebossmods and DotIt.db.profile.hidebossmod then
if addon == "BigWigs_Plugins" then
DotIt:ScheduleTimer(function() BigWigs:ToggleModuleActive("Bars", false) end, 2)
end
end
end
local function setupHooks()
-- dbm hook
if IsAddOnLoaded("DBM-Core") then
DotIt:Hook(DBM.Bars, "CreateBar", function(...) dbmHook(...) end)
elseif IsAddOnLoaded("BigWigs") then
if IsAddOnLoaded("BigWigs") then
AceLibrary("AceEvent-2.0"):RegisterEvent("BigWigs_StartBar", bigwigs)
DotIt:RegisterEvent("ADDON_LOADED")
elseif IsAddOnLoaded("DBM-Core") then
DotIt:RawHook(DBM.Bars, "CreateBar", function(...) dbmHook(...) end)
end
end