Commit 58447db8 authored by Blazeflack's avatar Blazeflack

Remove plugin header with information, now a dedicated 'library'

parent 208d9331
local E, L, V, P, G, _ = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local EAB = E:NewModule('ExtraActionBars','AceEvent-3.0')
local AB = E:GetModule('ActionBars');
local group
-- Defaults
P['actionbar']['bar7'] = {
......@@ -68,99 +67,7 @@ P['actionbar']['bar10'] = {
['visibility'] = '[vehicleui] hide; [overridebar] hide; [petbattle] hide; show',
}
--Information popups
E.PopupDialogs['CBPO'] = {
text = L['PLUGIN_INFO'],
button1 = OKAY,
hasEditBox = true,
editBoxWidth = 350,
timeout = 0,
whileDead = true,
preferredIndex = 3,
hideOnEscape = true,
exclusive = true,
OnShow = function(self)
self.editBox:SetText("http://www.tukui.org/addons/index.php?act=view&id=62")
self.editBox:HighlightText()
end,
EditBoxOnEnterPressed = function(self) self:GetParent():Hide() end,
EditBoxOnEscapePressed = function(self) self:GetParent():Hide() end,
}
E.PopupDialogs['CBS'] = {
text = L['PLUGIN_INFO'],
button1 = OKAY,
hasEditBox = true,
editBoxWidth = 350,
timeout = 0,
whileDead = true,
preferredIndex = 3,
hideOnEscape = true,
exclusive = true,
OnShow = function(self)
self.editBox:SetText("http://www.tukui.org/addons/index.php?act=view&id=36")
self.editBox:HighlightText()
end,
EditBoxOnEnterPressed = function(self) self:GetParent():Hide() end,
EditBoxOnEscapePressed = function(self) self:GetParent():Hide() end,
}
E.PopupDialogs['CA'] = {
text = L['PLUGIN_INFO'],
button1 = OKAY,
hasEditBox = true,
editBoxWidth = 350,
timeout = 0,
whileDead = true,
preferredIndex = 3,
hideOnEscape = true,
exclusive = true,
OnShow = function(self)
self.editBox:SetText("http://www.tukui.org/addons/index.php?act=view&id=85")
self.editBox:HighlightText()
end,
EditBoxOnEnterPressed = function(self) self:GetParent():Hide() end,
EditBoxOnEscapePressed = function(self) self:GetParent():Hide() end,
}
E.PopupDialogs['EAB'] = {
text = L['PLUGIN_INFO'],
button1 = OKAY,
hasEditBox = true,
editBoxWidth = 350,
timeout = 0,
whileDead = true,
preferredIndex = 3,
hideOnEscape = true,
exclusive = true,
OnShow = function(self)
self.editBox:SetText("http://www.tukui.org/addons/index.php?act=view&id=65")
self.editBox:HighlightText()
end,
EditBoxOnEnterPressed = function(self) self:GetParent():Hide() end,
EditBoxOnEscapePressed = function(self) self:GetParent():Hide() end,
}
E.PopupDialogs['VAT'] = {
text = L['PLUGIN_INFO'],
button1 = OKAY,
hasEditBox = true,
editBoxWidth = 350,
timeout = 0,
whileDead = true,
preferredIndex = 3,
hideOnEscape = true,
exclusive = true,
OnShow = function(self)
self.editBox:SetText("http://www.tukui.org/addons/index.php?act=view&id=91")
self.editBox:HighlightText()
end,
EditBoxOnEnterPressed = function(self) self:GetParent():Hide() end,
EditBoxOnEscapePressed = function(self) self:GetParent():Hide() end,
}
function EAB:InsertOptions()
--Plugin 'GroupHeader' with information about me and all my plugins
if not E.Options.args.blazeplugins then
E.Options.args.blazeplugins = {
order = -2,
......@@ -168,121 +75,8 @@ function EAB:InsertOptions()
name = 'Plugins (by Blazeflack)',
args = {},
}
E.Options.args.blazeplugins.args.aboutHeader = {
order = 1,
type = 'header',
name = L['About Blazeflack'],
}
E.Options.args.blazeplugins.args.aboutBody = {
order = 2,
type = 'description',
fontSize = 'medium',
name = L['BLAZE_DESC'],
}
E.Options.args.blazeplugins.args.pluginsHeader = {
order = 3,
type = 'header',
name = L['List of Plugins for ElvUI made by Blazeflack'],
}
E.Options.args.blazeplugins.args.aboutCBPO = {
order = 4,
type = 'group',
name = 'ElvUI_CastBarPowerOverlay',
guiInline = true,
args = {
info = {
order = 1,
type = 'description',
name = L['CBPO_DESC'],
},
url = {
order = 2,
type = 'execute',
name = L['Click Me'],
func = function() E:StaticPopup_Show('CBPO', 'ElvUI_CastBarPowerOverlay') end,
},
},
}
E.Options.args.blazeplugins.args.aboutCBS = {
order = 5,
type = 'group',
name = 'ElvUI_CastBarSnap',
guiInline = true,
args = {
info = {
order = 1,
type = 'description',
name = L['CBS_DESC'],
},
url = {
order = 2,
type = 'execute',
name = L['Click Me'],
func = function() E:StaticPopup_Show('CBS', 'ElvUI_CastBarSnap') end,
},
},
}
E.Options.args.blazeplugins.args.aboutCA = {
order = 6,
type = 'group',
name = 'ElvUI_ChannelAlerts',
guiInline = true,
args = {
info = {
order = 1,
type = 'description',
name = L['CA_DESC'],
},
url = {
order = 2,
type = 'execute',
name = L['Click Me'],
func = function() E:StaticPopup_Show('CA', 'ElvUI_ChannelAlerts') end,
},
},
}
E.Options.args.blazeplugins.args.aboutEAB = {
order = 7,
type = 'group',
name = 'ElvUI_ExtraActionBars',
guiInline = true,
args = {
info = {
order = 1,
type = 'description',
name = L['EAB_DESC'],
},
url = {
order = 2,
type = 'execute',
name = L['Click Me'],
func = function() E:StaticPopup_Show('EAB', 'ElvUI_ExtraActionBars') end,
},
},
}
E.Options.args.blazeplugins.args.aboutVAT = {
order = 8,
type = 'group',
name = 'ElvUI_VisualAuraTimers',
guiInline = true,
args = {
info = {
order = 1,
type = 'description',
name = L['VAT_DESC'],
},
url = {
order = 2,
type = 'execute',
name = L['Click Me'],
func = function() E:StaticPopup_Show('VAT', 'ElvUI_VisualAuraTimers') end,
},
},
}
end
--
-- Insertion of ElvUI_OneExtraActionBar options starts here
--
local points = {
['TOPLEFT'] = 'TOPLEFT',
['TOPRIGHT'] = 'TOPRIGHT',
......@@ -294,11 +88,12 @@ function EAB:InsertOptions()
order = 40,
type = 'group',
name = 'ExtraActionBars',
disabled = function() return not E.private.actionbar.enable end,
childGroups = 'tab',
args = {},
}
group = E.Options.args.blazeplugins.args.EAB.args
local group = E.Options.args.blazeplugins.args.EAB.args
for i = 7, 10 do
local name = L['Bar ']..i
group['bar'..i] = {
......
......@@ -85,9 +85,12 @@ function EAB:PLAYER_ENTERING_WORLD()
EAB:CreateBars()
end
function EAB:Initialize()
self:RegisterEvent('PLAYER_ENTERING_WORLD')
function EAB:OnInitialize()
-- Register callback with LibElvUIPlugin
EP:RegisterPlugin(addon, EAB.InsertOptions)
--ElvUI ActionBars are not enabled, stop right here!
if E.private.actionbar.enable ~= true then return; end
self:RegisterEvent('PLAYER_ENTERING_WORLD')
end
\ No newline at end of file
......@@ -2,40 +2,7 @@
local L = LibStub("AceLocale-3.0"):NewLocale("ElvUI", "enUS", true);
if not L then return end
--Plugin GroupHeader locales
L['About Blazeflack'] = true
L['List of Plugins for ElvUI made by Blazeflack'] = true
L['PLUGIN_INFO'] = 'Please visit the url below for information about %s'
L['Click Me'] = true
L['BLAZE_DESC'] = [=[Blazeflack is a moderator at http://tukui.org.
He plays a human shadow priest named 'Blazii' on EU-Darksorrow.
When he is not busy wiping on raid bosses he is most likely either reading forums or optimizing a new alt.]=]
L['CBPO_DESC'] = [=[Allows you to overlay the castbar on the power frame.
Width and height is set automatically so it always matches the dimensions of the power frame.
In recent versions, options to hide or offset castbar text were added as well.
For more information please click the button below]=]
L['CBS_DESC'] = [=[Allows you to 'snap' the player castbar to any of the 6 ElvUI actionbars.
The player castbar gets positioned above the chosen actionbar and will automatically match the width of the bar.
There is an offset option, which allows you to move the castbar up or down.
For more information please click the button below]=]
L['CA_DESC'] = [=[Allows you to play a sound when someone posts a message in guild chat, officer chat or either of the 10 numbered channels.
For more information please click the button below]=]
L['EAB_DESC'] = [=[Adds 4 extra actionbars to ElvUI (Bar 7-10).
For more information please click the button below]=]
L['VAT_DESC'] = [=[Replaces timers on buffs and debuffs near the minimap with statusbars.
Allows you to choose whether you want it enabled for Buffs, Debuffs and Temporary Enchants individually.
You can set a threshold for when you want the timer to revert back to numbers.
For more information please click the button below]=]
--Nothing yet
--We don't need the rest if we're on enUS or enGB locale, so stop here.
if GetLocale() == "enUS" then return end
......
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