Quantcast

eab up

Steven Jackson [01-03-15 - 04:44]
eab up
Filename
Interface/AddOns/SVUI/packages/bar/SVBar.lua
Interface/AddOns/SVUI/packages/bar/components/extra.lua
diff --git a/Interface/AddOns/SVUI/packages/bar/SVBar.lua b/Interface/AddOns/SVUI/packages/bar/SVBar.lua
index cc53782..bc9dd84 100644
--- a/Interface/AddOns/SVUI/packages/bar/SVBar.lua
+++ b/Interface/AddOns/SVUI/packages/bar/SVBar.lua
@@ -1254,6 +1254,40 @@ do
 		SV.Mentalo:Add(petBar, L["Pet Bar"])
 	end
 end
+
+local CreateExtraBar = function(self)
+	local specialBar = CreateFrame("Frame", "SVUI_SpecialAbility", SV.Screen)
+	specialBar:SetPointToScale("BOTTOM", SV.Screen, "BOTTOM", 0, 250)
+	specialBar:SetSizeToScale(ExtraActionBarFrame:GetSize())
+	ExtraActionBarFrame:SetParent(specialBar)
+	ExtraActionBarFrame:ClearAllPoints()
+	ExtraActionBarFrame:SetPoint("CENTER", specialBar, "CENTER")
+	ExtraActionBarFrame.ignoreFramePositionManager = true;
+	local max = ExtraActionBarFrame:GetNumChildren()
+	for i = 1, max do
+		local name = ("ExtraActionButton%d"):format(i)
+		local icon = ("%sIcon"):format(name)
+		local cool = ("%sCooldown"):format(name)
+		local button = _G[name]
+		if(button) then
+			button.noResize = true;
+			button.pushed = true;
+			button.checked = true;
+			ModifyActionButton(button)
+			--button:SetStylePanel('Button')
+			_G[icon]:SetDrawLayer("ARTWORK")
+			_G[cool]:SetAllPointsIn()
+			local checkedTexture = button:CreateTexture(nil, "OVERLAY")
+			checkedTexture:SetTexture(0.9, 0.8, 0.1, 0.3)
+			checkedTexture:SetAllPointsIn()
+			button:SetCheckedTexture(checkedTexture)
+		end
+	end
+	if HasExtraActionBar()then
+		ExtraActionBarFrame:Show()
+	end
+	SV.Mentalo:Add(specialBar, L["Extra Action Button"])
+end
 --[[
 ##########################################################
 DEFAULT REMOVAL
@@ -1399,6 +1433,7 @@ function MOD:Load()
 	CreateActionBars(self)
 	CreateStanceBar(self)
 	CreatePetBar(self)
+	CreateExtraBar(self)
 	self:InitializeMicroBar()
 	self:InitializeExtraButtons()

diff --git a/Interface/AddOns/SVUI/packages/bar/components/extra.lua b/Interface/AddOns/SVUI/packages/bar/components/extra.lua
index 2455900..6a8c1a8 100644
--- a/Interface/AddOns/SVUI/packages/bar/components/extra.lua
+++ b/Interface/AddOns/SVUI/packages/bar/components/extra.lua
@@ -171,10 +171,6 @@ PACKAGE CALL
 ##########################################################
 ]]--
 function MOD:InitializeExtraButtons()
-	local extra = SV.SuperButton:AddAction("SVUI_ExtraActionButton", ExtraButtonUpdate, ExtraButton_OnEvent, 'EXTRAACTIONBUTTON1');
-	extra:RegisterEvent('UPDATE_EXTRA_ACTIONBAR')
-	ExtraActionBarFrame:UnregisterAllEvents()
-
 	local draenor = SV.SuperButton:AddSpell("SVUI_DraenorZoneAbility", DraenorButtonUpdate, DraenorButton_OnEvent, 'SVUI_DRAENORZONE');
 	draenor:RegisterForDrag("LeftButton")
 	draenor:SetScript('OnDragStart', DraenorButton_OnDrag)