Quantcast

fixed totem options, pvp window skinning and a stranded frame in the middle of the screen.

Steven Jackson [07-16-14 - 20:44]
fixed totem options, pvp window skinning and a stranded frame in the middle of the screen.
Filename
Interface/AddOns/SVUI/scripts/_load.xml
Interface/AddOns/SVUI/scripts/totems.lua
Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua
Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua
diff --git a/Interface/AddOns/SVUI/scripts/_load.xml b/Interface/AddOns/SVUI/scripts/_load.xml
index 8effc80..5cc2910 100644
--- a/Interface/AddOns/SVUI/scripts/_load.xml
+++ b/Interface/AddOns/SVUI/scripts/_load.xml
@@ -8,5 +8,5 @@
 	<Script file='totems.lua'/>
 	<Script file='raid.lua'/>
 	<Script file='reactions.lua'/>
-	<Script file='pvp.lua'/>
+	<!-- <Script file='pvp.lua'/> -->
 </Ui>
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/scripts/totems.lua b/Interface/AddOns/SVUI/scripts/totems.lua
index dc29e56..657b47c 100644
--- a/Interface/AddOns/SVUI/scripts/totems.lua
+++ b/Interface/AddOns/SVUI/scripts/totems.lua
@@ -22,7 +22,7 @@ CORE FUNCTIONS
 ##########################################################
 ]]--
 local Totems_OnEvent = function(self, event)
-	if not TotemBar then return end;
+	if not TotemBar then return end
 	local displayedTotems = 0;
 	for i=1,MAX_TOTEMS do
 		if TotemBar[i] then
@@ -44,7 +44,7 @@ local Totems_OnEvent = function(self, event)
 			end
 		end
 	end
-end;
+end

 function SuperVillain:UpdateTotems()
 	local totemSize = self.db.system.totems.size;
@@ -82,55 +82,52 @@ function SuperVillain:UpdateTotems()
 				button:SetPoint("BOTTOM", lastButton, "TOP", 0, totemSpace)
 			end
 		end
-	end;
+	end
 	local tS1 = ((totemSize  *  MAX_TOTEMS)  +  (totemSpace  *  MAX_TOTEMS)  +  totemSpace);
 	local tS2 = (totemSize  +  (totemSpace  *  2));
 	local tW = (totemGrowth == "HORIZONTAL" and tS1 or tS2);
 	local tH = (totemGrowth == "HORIZONTAL" and tS2 or tS1);
 	TotemBar:Size(tW, tH);
 	Totems_OnEvent()
-end;
+end

 local function CreateTotemBar()
 	if(not SuperVillain.db.system.totems.enable) then return; end
 	local xOffset = SuperVillain.db.SVDock.dockLeftWidth + 12
-	TotemBar = CreateFrame('Frame', nil, SuperVillain.UIParent)
-	TotemBar:SetPoint('BOTTOMLEFT', SuperVillain.UIParent, 'BOTTOMLEFT', xOffset, 40)
-
-	for i=1,MAX_TOTEMS do
-		local totem = CreateFrame('Button', 'TotemBarTotem'..i, TotemBar)
+	TotemBar = CreateFrame("Frame", nil, SuperVillain.UIParent)
+	TotemBar:SetPoint("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", xOffset, 40)
+	for i = 1, MAX_TOTEMS do
+		local totem = CreateFrame("Button", "TotemBarTotem"..i, TotemBar)
 		totem:SetID(i)
 		totem:SetButtonTemplate()
 		totem:Hide()
-		totem.Anchor = CreateFrame('Frame',nil,totem)
+		totem.Anchor = CreateFrame("Frame", nil, totem)
 		totem.Anchor:SetAlpha(0)
 		totem.Anchor:SetAllPoints()
-		totem.Icon = totem:CreateTexture(nil,'ARTWORK')
+		totem.Icon = totem:CreateTexture(nil, "ARTWORK")
 		totem.Icon:FillInner()
-		totem.Icon:SetTexCoord(0.1,0.9,0.1,0.9)
-		totem.CD = CreateFrame('Cooldown', 'TotemBarTotem'..i..'Cooldown', totem, 'CooldownFrameTemplate')
+		totem.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+		totem.CD = CreateFrame("Cooldown", "TotemBarTotem"..i.."Cooldown", totem, "CooldownFrameTemplate")
 		totem.CD:SetReverse(true)
 		totem.CD:FillInner()
 		SuperVillain:AddCD(totem.CD)
 		TotemBar[i] = totem
-	end;
-
+	end
 	TotemBar:Show()
-	Totems:RegisterEvent('PLAYER_TOTEM_UPDATE')
-	Totems:RegisterEvent('PLAYER_ENTERING_WORLD')
-	Totems:SetScript('OnEvent', Totems_OnEvent)
+	Totems:RegisterEvent("PLAYER_TOTEM_UPDATE")
+	Totems:RegisterEvent("PLAYER_ENTERING_WORLD")
+	Totems:SetScript("OnEvent", Totems_OnEvent)
 	Totems_OnEvent()
 	SuperVillain:UpdateTotems()
-
 	local frame_name;
 	if SuperVillain.class == "DEATHKNIGHT" then
-		frame_name = L['Ghoul Bar']
+		frame_name = L["Ghoul Bar"]
 	elseif SuperVillain.class == "DRUID" then
-		frame_name = L['Mushroom Bar']
+		frame_name = L["Mushroom Bar"]
 	else
-		frame_name = L['Totem Bar']
+		frame_name = L["Totem Bar"]
 	end
-	SuperVillain:SetSVMovable(TotemBar, 'TotemBar_MOVE', frame_name)
-end;
+	SuperVillain:SetSVMovable(TotemBar, "TotemBar_MOVE", frame_name)
+end

 SuperVillain.Registry:NewScript(CreateTotemBar);
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua
index 8a3cc91..218b641 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua
@@ -383,10 +383,10 @@ SuperVillain.Options.args.common = {
 									type = "toggle",
 									name = L["Totems"],
 									get = function(j)
-										return SuperVillain.db.system.totems
+										return SuperVillain.db.system.totems.enable
 									end,
 									set = function(j, value)
-										SuperVillain.db.system.totems = value;
+										SuperVillain.db.system.totems.enable = value;
 										SuperVillain:StaticPopup_Show("RL_CLIENT")
 									end
 								},
@@ -405,7 +405,13 @@ SuperVillain.Options.args.common = {
 									name = L["Totem Button Size"],
 									min = 24,
 									max = 60,
-									step = 1
+									step = 1,
+									get = function(j)
+										return SuperVillain.db.system.totems[j[#j]]
+									end,
+									set = function(j, value)
+										SuperVillain.db.system.totems[j[#j]] = value
+									end
 								},
 								spacing = {
 									order = 5,
@@ -414,7 +420,13 @@ SuperVillain.Options.args.common = {
 									name = L['Totem Button Spacing'],
 									min = 1,
 									max = 10,
-									step = 1
+									step = 1,
+									get = function(j)
+										return SuperVillain.db.system.totems[j[#j]]
+									end,
+									set = function(j, value)
+										SuperVillain.db.system.totems[j[#j]] = value
+									end
 								},
 								sortDirection = {
 									order = 6,
@@ -423,7 +435,13 @@ SuperVillain.Options.args.common = {
 									values = {
 										['ASCENDING'] = L['Ascending'],
 										['DESCENDING'] = L['Descending']
-									}
+									},
+									get = function(j)
+										return SuperVillain.db.system.totems[j[#j]]
+									end,
+									set = function(j, value)
+										SuperVillain.db.system.totems[j[#j]] = value
+									end
 								},
 								showBy = {
 									order = 7,
@@ -432,7 +450,13 @@ SuperVillain.Options.args.common = {
 									values = {
 										['VERTICAL'] = L['Vertical'],
 										['HORIZONTAL'] = L['Horizontal']
-									}
+									},
+									get = function(j)
+										return SuperVillain.db.system.totems[j[#j]]
+									end,
+									set = function(j, value)
+										SuperVillain.db.system.totems[j[#j]] = value
+									end
 								}
 							}
 						}
diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua
index 0c8afeb..a105e8f 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua
@@ -20,6 +20,7 @@ local MOD = SuperVillain.Registry:Expose("SVStyle");
 PVP STYLER
 ##########################################################
 ]]--
+LoadAddOn("Blizzard_PVPUI")
 local function PVPFrameStyle()
 	if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.pvp ~= true then
 		return
@@ -114,28 +115,31 @@ local function PVPFrameStyle()
 	MOD:ApplyScrollStyle(WarGamesFrameScrollFrameScrollBar)
 	MOD:ApplyScrollStyle(WarGamesFrameInfoScrollFrameScrollBar)
 	WarGamesFrame.HorizontalBar:Formula409()
+	PVPUIFrame.LeftInset:Formula409()
 	PVPReadyDialog:Formula409()
-	PVPReadyDialog:SetPanelTemplate("Pattern", true)
+	PVPReadyDialog:SetPanelTemplate("Pattern")
 	PVPReadyDialogEnterBattleButton:SetButtonTemplate()
 	PVPReadyDialogLeaveQueueButton:SetButtonTemplate()
 	MOD:ApplyCloseButtonStyle(PVPReadyDialogCloseButton)
 	PVPReadyDialogRoleIcon.texture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS")
 	PVPReadyDialogRoleIcon.texture:SetAlpha(0.5)
-	PVPUIFrame.LeftInset:Formula409()
+
 	ConquestFrame.Inset:SetFixedPanelTemplate("Inset")
 	WarGamesFrameScrollFrame:SetPanelTemplate("Inset",false,2,2,6)
-	hooksecurefunc("PVPReadyDialog_Display", function(n, l, N, O, P, Q, R)
+
+	hooksecurefunc("PVPReadyDialog_Display", function(self, l, N, O, P, Q, R)
 		if R == "DAMAGER" then
 			PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord())
 		elseif R == "TANK" then
 			PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord())
 		elseif R == "HEALER" then
 			PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord())
-		end;
+		end
 		if P == "ARENA" then
-			n:SetHeight(100)
-		end;
-		n.background:Hide()
+			self:SetHeight(100)
+		end
+		self:Formula409()
+		self:SetPanelTemplate("Pattern")
 	end)
 end;
 --[[
@@ -143,4 +147,6 @@ end;
 STYLE LOADING
 ##########################################################
 ]]--
-MOD:SaveBlizzardStyle('Blizzard_PVPUI',PVPFrameStyle)
\ No newline at end of file
+MOD:SaveBlizzardStyle('Blizzard_PVPUI',PVPFrameStyle, true)
+
+-- /script StaticPopupSpecial_Show(PVPReadyDialog)
\ No newline at end of file