Commit 1380f4f0 authored by Blazeflack's avatar Blazeflack

Release v1.08

parent 6a0068ca
<p><strong>1.08, June 29th 2019</strong></p>
<ul>
<li>Fixed error regarding AceLocale.</li>
<li>Removed old obsolete code.</li>
<li>Moved configuration from "Plugins (Blazeflack)" to the existing "Plugins" category.</li>
<li>Updated toc.</li>
</ul>
<br />
<p><strong>1.07, July 28th 2018</strong></p>
<ul>
<li>Updated and fixed .toc file.</li>
......
## Interface: 80000
## Interface: 80200
## Author: Blazeflack
## Version: 1.07
## Version: 1.08
## Title: |cff1784d1ElvUI|r CastBarOverlay
## Notes: Allows you to overlay castbars on other frames.
## RequiredDeps: ElvUI
## OptionalDeps: ElvUI_CastBarSnap
## X-Tukui-ProjectFolders: ElvUI_CastBarOverlay
locales.lua
......
......@@ -65,15 +65,6 @@ P['CBO'] = {
}
function CBO:InsertOptions()
if not E.Options.args.blazeplugins then
E.Options.args.blazeplugins = {
order = -2,
type = 'group',
name = 'Plugins (by Blazeflack)',
args = {},
}
end
local function CreateOptionsGroup(order, name, unit, updateFunc)
local group = {
order = order,
......@@ -178,8 +169,7 @@ function CBO:InsertOptions()
return group
end
E.Options.args.blazeplugins.args.CBO = {
order = 10,
E.Options.args.plugins.args.CBO = {
type = 'group',
name = 'CastBarOverlay',
childGroups = 'tab',
......@@ -187,16 +177,13 @@ function CBO:InsertOptions()
args = {},
}
local options = E.Options.args.blazeplugins.args.CBO.args
local options = E.Options.args.plugins.args.CBO.args
options.player = CreateOptionsGroup(1, L["Player"], "player", CBO.UpdateSettings)
options.target = CreateOptionsGroup(2, L["Target"], "target", CBO.UpdateSettings)
options.focus = CreateOptionsGroup(3, L["Focus"], "focus", CBO.UpdateSettings)
options.pet = CreateOptionsGroup(4, L["Pet"], "pet", CBO.UpdateSettings)
options.arena = CreateOptionsGroup(5, L["Arena"], "arena", CBO.UpdateSettings)
options.boss = CreateOptionsGroup(6, L["Boss"], "boss", CBO.UpdateSettings)
--Disable player overlay if CastBarSnap is enabled
E.Options.args.blazeplugins.args.CBO.args.player.args.overlay.disabled = function() return IsAddOnLoaded('ElvUI_CastBarSnap') end
end
E:RegisterModule(CBO:GetName())
\ No newline at end of file
......@@ -3,31 +3,11 @@ local CBO = E:GetModule("CastBarOverlay")
local UF = E:GetModule("UnitFrames");
local EP = LibStub("LibElvUIPlugin-1.0")
local addon, ns = ...
local CBS_Enabled = false
--Cache global variables
local _G = _G
local C_Timer_After = C_Timer.After
-- Create compatibility warning popup
E.PopupDialogs["CBOCompatibility"] = {
text = L["CBO_CONFLICT_WARNING"],
button1 = L["I understand"],
OnAccept = function() E.private.CBO.warned = true end,
timeout = 0,
whileDead = 1,
preferredIndex = 3,
}
E.PopupDialogs["CBO_CBPOWARNING"] = {
text = L["CBO_CBPOWARNING"],
button1 = L["I understand"],
OnAccept = function() DisableAddOn("ElvUI_CastBarPowerOverlay"); ReloadUI() end,
timeout = 0,
whileDead = 1,
preferredIndex = 3,
}
-- Warn about trying to overlay on disabled power bar
E.PopupDialogs["CBO_PowerDisabled"] = {
text = L["CBO_POWER_DISABLED"],
......@@ -177,7 +157,7 @@ function CBO:UpdateSettings(unit)
E.db.CBO[unit].overlayOnFrame = "HEALTH"
end
if (unit == "player" and not CBS_Enabled) or unit == "target" or unit == "focus" or unit == "pet" then
if unit == "player" or unit == "target" or unit == "focus" or unit == "pet" then
local unitFrameName = "ElvUF_"..E:StringTitle(unit)
local unitframe = _G[unitFrameName]
ConfigureCastbar(unit, unitframe)
......@@ -211,26 +191,11 @@ function CBO:Initialize()
--ElvUI UnitFrames are not enabled, stop right here!
if E.private.unitframe.enable ~= true then return end
if IsAddOnLoaded("ElvUI_CastBarSnap") then
CBS_Enabled = true
if not E.private.CBO.warned then
-- Warn user about CastBarPowerOverlay being disabled for Player CastBar
E:StaticPopup_Show("CBOCompatibility")
end
E.db.CBO.player.overlay = false
else
E.private.CBO.warned = false
end
--Check if the old CastBarPowerOverlay is enabled
if IsAddOnLoaded("ElvUI_CastBarPowerOverlay") then
E:StaticPopup_Show("CBO_CBPOWARNING")
end
--Profile changed, update castbar overlay settings
hooksecurefunc(E, "UpdateAll", function()
--Delay it a bit to allow all db changes to take effect before we update
self:ScheduleTimer("UpdateAllCastbars", 0.5)
hooksecurefunc(E, "UpdateStart", function()
if E.staggerUpdateRunning then --Sign that profile changed
CBO:UpdateAllCastbars()
end
end)
--Castbar was modified, re-apply settings
......
-- English localization file for enUS and enGB.
local L = LibStub("AceLocale-3.0"):NewLocale("ElvUI", "enUS", true);
local L = LibStub("AceLocale-3.0-ElvUI"):NewLocale("ElvUI", "enUS", true);
if not L then return end
L["CBO_CBPOWARNING"] = "You still have the outdated addon 'CastBarPowerOverlay' enabled. It will now be disabled. You should uninstall it when possible."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment