diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index bba6bf2..d0c945e 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -539,18 +539,19 @@ function MOD:CreateDockPanels() toolbarTop.openWidth = (leftWidth - 1) / 3; --TOP STAT HOLDERS + local topWidth = (leftWidth + rightWidth) * 0.8 local topanchor = CreateFrame("Frame", "SuperDockTopDataAnchor", SuperVillain.UIParent) - topanchor:Size((leftWidth + rightWidth) - 2, buttonsize - 8) + topanchor:Size(topWidth - 2, buttonsize - 8) topanchor:Point("LEFT", toolbarTop, "RIGHT", spacing, 0) SuperVillain:AddToDisplayAudit(topanchor) local topleftdata = CreateFrame("Frame", "TopLeftDataPanel", topanchor) - topleftdata:Size(leftWidth - 1, buttonsize - 8) + topleftdata:Size((topWidth * 0.5) - 1, buttonsize - 8) topleftdata:Point("LEFT", topanchor, "LEFT", 0, 0) STATS:NewAnchor(topleftdata, 3, "ANCHOR_CURSOR", true) local toprightdata = CreateFrame("Frame", "TopRightDataPanel", topanchor) - toprightdata:Size(leftWidth - 1, buttonsize - 8) + toprightdata:Size((topWidth * 0.5) - 1, buttonsize - 8) toprightdata:Point("RIGHT", topanchor, "RIGHT", 0, 0) STATS:NewAnchor(toprightdata, 3, "ANCHOR_CURSOR", true) diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index 93b156c..cf45924 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -81,7 +81,9 @@ local tooltips = { ShoppingTooltip2, ShoppingTooltip3, WorldMapTooltip, WorldMapCompareTooltip1, WorldMapCompareTooltip2, WorldMapCompareTooltip3, DropDownList1MenuBackdrop, - DropDownList2MenuBackdrop, DropDownList3MenuBackdrop, BNToastFrame + DropDownList2MenuBackdrop, DropDownList3MenuBackdrop, BNToastFrame, + PetBattlePrimaryAbilityTooltip, PetBattlePrimaryUnitTooltip, + BattlePetTooltip, FloatingBattlePetTooltip, FloatingPetBattleAbilityTooltip } local classification = { @@ -160,7 +162,7 @@ local function GetTalentSpec(unit,isPlayer) return specData end end -end +end --[[ ########################################################## CORE FUNCTIONS @@ -775,6 +777,173 @@ local _hook_OnTipHide = function(self) self.SuperBorder:ClearMaskColors() end +local function ApplyTooltipSkins() + local barHeight = SuperVillain.db.SVTip.healthBar.height + + for i, tooltip in pairs(tooltips) do + if(not tooltip) then return end + if(not tooltip.SuperBorder) then + local barOffset = 0 + local alpha = 0.2 + if(tooltip == GameTooltip) then + barOffset = (barHeight + 6) * -1 + alpha = 0.5 + end + + local mask = CreateFrame("Frame", nil, tooltip) + mask:SetPoint("TOPLEFT", tooltip, "TOPLEFT", 0, 0) + mask:SetPoint("BOTTOMRIGHT", tooltip, "BOTTOMRIGHT", 0, barOffset) + mask:SetFrameLevel(0) + mask.ToggleHeight = barOffset + mask.ToggleAlpha = alpha + + --[[ STARBURST TOP ]] + mask[1] = mask:CreateTexture(nil, "BACKGROUND") + mask[1]:SetPoint("BOTTOMLEFT", mask, "TOPLEFT", 0, 0) + mask[1]:SetHeight(mask:GetWidth() * 0.25) + mask[1]:SetWidth(mask:GetWidth() * 0.25) + mask[1]:SetTexture(TT_TOP) + mask[1]:SetVertexColor(0,0,0) + mask[1]:SetBlendMode("BLEND") + mask[1]:SetAlpha(alpha) + --[[ STARBURST BOTTOM ]] + mask[2] = mask:CreateTexture(nil, "BACKGROUND") + mask[2]:SetPoint("TOPRIGHT", mask, "BOTTOMRIGHT", 0, 0) + mask[2]:SetHeight(mask:GetWidth() * 0.25) + mask[2]:SetWidth(mask:GetWidth() * 0.25) + mask[2]:SetTexture(TT_BOTTOM) + mask[2]:SetVertexColor(0,0,0) + mask[2]:SetBlendMode("BLEND") + mask[2]:SetAlpha(alpha) + --[[ HALFTONE RIGHT ]] + mask[3] = mask:CreateTexture(nil, "BACKGROUND") + mask[3]:SetPoint("LEFT", mask, "RIGHT", 0, 0) + mask[3]:SetSize(64,64) + mask[3]:SetTexture(TT_RIGHT) + mask[3]:SetVertexColor(0,0,0) + mask[3]:SetBlendMode("BLEND") + mask[3]:SetAlpha(alpha) + --[[ HALFTONE LEFT ]] + mask[4] = mask:CreateTexture(nil, "BACKGROUND") + mask[4]:SetPoint("RIGHT", mask, "LEFT", 0, 0) + mask[4]:SetSize(64,64) + mask[4]:SetTexture(TT_LEFT) + mask[4]:SetVertexColor(0,0,0) + mask[4]:SetBlendMode("BLEND") + mask[4]:SetAlpha(alpha) + + --[[ BORDER TOP ]] + mask[5] = mask:CreateTexture(nil, "OVERLAY") + mask[5]:SetPoint("TOPLEFT", mask, "TOPLEFT", 0, 0) + mask[5]:SetPoint("TOPRIGHT", mask, "TOPRIGHT", 0, 0) + mask[5]:SetHeight(1) + mask[5]:SetTexture(0,0,0) + --[[ BORDER BOTTOM ]] + mask[6] = mask:CreateTexture(nil, "OVERLAY") + mask[6]:SetPoint("BOTTOMLEFT", mask, "BOTTOMLEFT", 0, 0) + mask[6]:SetPoint("BOTTOMRIGHT", mask, "BOTTOMRIGHT", 0, 0) + mask[6]:SetHeight(1) + mask[6]:SetTexture(0,0,0) + --[[ BORDER RIGHT ]] + mask[7] = mask:CreateTexture(nil, "OVERLAY") + mask[7]:SetPoint("TOPRIGHT", mask, "TOPRIGHT", 0, 0) + mask[7]:SetPoint("BOTTOMRIGHT", mask, "BOTTOMRIGHT", 0, 0) + mask[7]:SetWidth(1) + mask[7]:SetTexture(0,0,0) + --[[ BORDER LEFT ]] + mask[8] = mask:CreateTexture(nil, "OVERLAY") + mask[8]:SetPoint("TOPLEFT", mask, "TOPLEFT", 0, 0) + mask[8]:SetPoint("BOTTOMLEFT", mask, "BOTTOMLEFT", 0, 0) + mask[8]:SetWidth(1) + mask[8]:SetTexture(0,0,0) + + mask:SetBackdrop({ + bgFile = TT_BG, + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = true, + tileSize = 128, + edgeSize = 1 + }) + mask:SetBackdropColor(0, 0, 0, 1) + mask:SetBackdropBorderColor(0, 0, 0) + + mask.SetMaskBorder = SetMaskBorder + mask.SetBurstColor = SetBurstColor + mask.SetToneColor = SetToneColor + mask.ClearMaskColors = ClearMaskColors + + tooltip.SuperBorder = mask + + if tooltip.Background then + tooltip.Background:SetTexture(0,0,0,0) + end + + if tooltip.Delimiter1 then + tooltip.Delimiter1:SetTexture(0,0,0,0) + tooltip.Delimiter2:SetTexture(0,0,0,0) + end + + if tooltip.BorderTop then + tooltip.BorderTop:SetTexture(0,0,0,0) + end + + if tooltip.BorderTopLeft then + tooltip.BorderTopLeft:SetTexture(0,0,0,0) + end + + if tooltip.BorderTopRight then + tooltip.BorderTopRight:SetTexture(0,0,0,0) + end + + if tooltip.BorderLeft then + tooltip.BorderLeft:SetTexture(0,0,0,0) + end + + if tooltip.BorderRight then + tooltip.BorderRight:SetTexture(0,0,0,0) + end + + if tooltip.BorderBottom then + tooltip.BorderBottom:SetTexture(0,0,0,0) + end + + if tooltip.BorderBottomRight then + tooltip.BorderBottomRight:SetTexture(0,0,0,0) + end + + if tooltip.BorderBottomLeft then + tooltip.BorderBottomLeft:SetTexture(0,0,0,0) + end + + tooltip:SetBackdrop({ + bgFile = TT_BG, + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tileSize = 128, + tile = true, + edgeSize = 1 + }) + tooltip:SetBackdropColor(0, 0, 0, 0) + tooltip:SetBackdropBorderColor(0, 0, 0, 0) + + tooltip.SetBackdrop = Override_BG + NewHook(tooltip, "SetBackdropColor", Override_BGColor) + NewHook(tooltip, "SetBackdropBorderColor", Override_BorderColor) + tooltip:HookScript("OnShow", _hook_OnTipShow) + tooltip:HookScript("OnHide", _hook_OnTipHide) + end + tremove(tooltips, i) + end + if(not tooltips[1]) then + MOD.AllSkinned = true + end +end + +function MOD:ReLoad() + if(not self.AllSkinned) then + ApplyTooltipSkins() + end +end + function MOD:Load() BNToastFrame:Point("TOPRIGHT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, -10) SuperVillain:SetSVMovable(BNToastFrame, L["BNet Frame"], nil, nil, nil, nil, "BNET") @@ -789,116 +958,7 @@ function MOD:Load() local barHeight = self.db.healthBar.height - for _, tooltip in pairs(tooltips) do - if(tooltip.SuperBorder) then return end - - local barOffset = 0 - local alpha = 0.2 - if(tooltip == GameTooltip) then - barOffset = (barHeight + 6) * -1 - alpha = 0.5 - end - - local mask = CreateFrame("Frame", nil, tooltip) - mask:SetPoint("TOPLEFT", tooltip, "TOPLEFT", 0, 0) - mask:SetPoint("BOTTOMRIGHT", tooltip, "BOTTOMRIGHT", 0, barOffset) - mask:SetFrameLevel(tooltip:GetFrameLevel() - 1) - mask.ToggleHeight = barOffset - mask.ToggleAlpha = alpha - - --[[ STARBURST TOP ]] - mask[1] = mask:CreateTexture(nil, "BACKGROUND") - mask[1]:SetPoint("BOTTOMLEFT", mask, "TOPLEFT", 0, 0) - mask[1]:SetHeight(mask:GetWidth() * 0.25) - mask[1]:SetWidth(mask:GetWidth() * 0.25) - mask[1]:SetTexture(TT_TOP) - mask[1]:SetVertexColor(0,0,0) - mask[1]:SetBlendMode("BLEND") - mask[1]:SetAlpha(alpha) - --[[ STARBURST BOTTOM ]] - mask[2] = mask:CreateTexture(nil, "BACKGROUND") - mask[2]:SetPoint("TOPRIGHT", mask, "BOTTOMRIGHT", 0, 0) - mask[2]:SetHeight(mask:GetWidth() * 0.25) - mask[2]:SetWidth(mask:GetWidth() * 0.25) - mask[2]:SetTexture(TT_BOTTOM) - mask[2]:SetVertexColor(0,0,0) - mask[2]:SetBlendMode("BLEND") - mask[2]:SetAlpha(alpha) - --[[ HALFTONE RIGHT ]] - mask[3] = mask:CreateTexture(nil, "BACKGROUND") - mask[3]:SetPoint("LEFT", mask, "RIGHT", 0, 0) - mask[3]:SetSize(64,64) - mask[3]:SetTexture(TT_RIGHT) - mask[3]:SetVertexColor(0,0,0) - mask[3]:SetBlendMode("BLEND") - mask[3]:SetAlpha(alpha) - --[[ HALFTONE LEFT ]] - mask[4] = mask:CreateTexture(nil, "BACKGROUND") - mask[4]:SetPoint("RIGHT", mask, "LEFT", 0, 0) - mask[4]:SetSize(64,64) - mask[4]:SetTexture(TT_LEFT) - mask[4]:SetVertexColor(0,0,0) - mask[4]:SetBlendMode("BLEND") - mask[4]:SetAlpha(alpha) - - --[[ BORDER TOP ]] - mask[5] = mask:CreateTexture(nil, "OVERLAY") - mask[5]:SetPoint("TOPLEFT", mask, "TOPLEFT", 0, 0) - mask[5]:SetPoint("TOPRIGHT", mask, "TOPRIGHT", 0, 0) - mask[5]:SetHeight(1) - mask[5]:SetTexture(0,0,0) - --[[ BORDER BOTTOM ]] - mask[6] = mask:CreateTexture(nil, "OVERLAY") - mask[6]:SetPoint("BOTTOMLEFT", mask, "BOTTOMLEFT", 0, 0) - mask[6]:SetPoint("BOTTOMRIGHT", mask, "BOTTOMRIGHT", 0, 0) - mask[6]:SetHeight(1) - mask[6]:SetTexture(0,0,0) - --[[ BORDER RIGHT ]] - mask[7] = mask:CreateTexture(nil, "OVERLAY") - mask[7]:SetPoint("TOPRIGHT", mask, "TOPRIGHT", 0, 0) - mask[7]:SetPoint("BOTTOMRIGHT", mask, "BOTTOMRIGHT", 0, 0) - mask[7]:SetWidth(1) - mask[7]:SetTexture(0,0,0) - --[[ BORDER LEFT ]] - mask[8] = mask:CreateTexture(nil, "OVERLAY") - mask[8]:SetPoint("TOPLEFT", mask, "TOPLEFT", 0, 0) - mask[8]:SetPoint("BOTTOMLEFT", mask, "BOTTOMLEFT", 0, 0) - mask[8]:SetWidth(1) - mask[8]:SetTexture(0,0,0) - - mask:SetBackdrop({ - bgFile = TT_BG, - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - tile = true, - tileSize = 128, - edgeSize = 1 - }) - mask:SetBackdropColor(0, 0, 0, 1) - mask:SetBackdropBorderColor(0, 0, 0) - - mask.SetMaskBorder = SetMaskBorder - mask.SetBurstColor = SetBurstColor - mask.SetToneColor = SetToneColor - mask.ClearMaskColors = ClearMaskColors - - tooltip.SuperBorder = mask - - tooltip:SetBackdrop({ - bgFile = TT_BG, - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - tileSize = 128, - tile = true, - edgeSize = 1 - }) - tooltip:SetBackdropColor(0, 0, 0, 0) - tooltip:SetBackdropBorderColor(0, 0, 0, 0) - - tooltip.SetBackdrop = Override_BG - NewHook(tooltip, "SetBackdropColor", Override_BGColor) - NewHook(tooltip, "SetBackdropBorderColor", Override_BorderColor) - tooltip:HookScript("OnShow", _hook_OnTipShow) - tooltip:HookScript("OnHide", _hook_OnTipHide) - end + ApplyTooltipSkins() GameTooltipStatusBar:Height(barHeight) GameTooltipStatusBar:SetStatusBarTexture(SuperVillain.Media.bar.default) diff --git a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua index 64e6fdb..5f744ed 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua @@ -142,7 +142,7 @@ local Reposition = function(self) bar.Text:SetPoint("TOPLEFT", bar, "TOPLEFT", 10, 0) bar.Text:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -10, 0) - bar.Text:SetFont(TRACKER_FONT, size, 'OUTLINE') + bar.Text:SetFont(TRACKER_FONT, scaled, 'OUTLINE') end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua index 9800ab3..4fc1fc1 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua @@ -226,7 +226,7 @@ function MOD:CreateClassBar(playerFrame) points.Text = points:CreateFontString(nil,'OVERLAY') points.Text:SetAllPoints(points) - points.Text:SetFontTemplate(TRACKER_FONT,30,'OUTLINE') + points.Text:SetFont(TRACKER_FONT,30,'OUTLINE') points.Text:SetTextColor(1,1,1) bar.Tracking = points; @@ -237,7 +237,7 @@ function MOD:CreateClassBar(playerFrame) anticipation.Text = anticipation:CreateFontString(nil,'OVERLAY') anticipation.Text:SetAllPoints(anticipation) - anticipation.Text:SetFontTemplate(TRACKER_FONT,30,'OUTLINE') + anticipation.Text:SetFont(TRACKER_FONT,30,'OUTLINE') anticipation.Text:SetTextColor(1,1,1) bar.Anticipation = anticipation; @@ -248,7 +248,7 @@ function MOD:CreateClassBar(playerFrame) guile.Text = guile:CreateFontString(nil,'OVERLAY') guile.Text:SetAllPoints(guile) - guile.Text:SetFontTemplate(TRACKER_FONT,30,'OUTLINE') + guile.Text:SetFont(TRACKER_FONT,30,'OUTLINE') guile.Text:SetTextColor(1,1,1) bar.Guile = guile; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua index 4218e8a..9806246 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua @@ -24,23 +24,6 @@ local PBAB_WIDTH = 382; local PBAB_HEIGHT = 72; local PetBattleActionBar = CreateFrame("Frame", "SVUI_PetBattleActionBar", UIParent) -local function PetBattleSetTooltip(frame) - frame.Background:SetTexture(0,0,0,0) - if frame.Delimiter1 then - frame.Delimiter1:SetTexture(0,0,0,0) - frame.Delimiter2:SetTexture(0,0,0,0) - end; - frame.BorderTop:SetTexture(0,0,0,0) - frame.BorderTopLeft:SetTexture(0,0,0,0) - frame.BorderTopRight:SetTexture(0,0,0,0) - frame.BorderLeft:SetTexture(0,0,0,0) - frame.BorderRight:SetTexture(0,0,0,0) - frame.BorderBottom:SetTexture(0,0,0,0) - frame.BorderBottomRight:SetTexture(0,0,0,0) - frame.BorderBottomLeft:SetTexture(0,0,0,0) - frame:SetFixedPanelTemplate("Transparent", true) -end; - local function PetBattleButtonHelper(frame) frame:SetNormalTexture("") frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -52,7 +35,7 @@ local function PetBattleButtonHelper(frame) frame.pushed:FillInner(frame.Panel) frame.hover:FillInner(frame.Panel) frame:SetFrameStrata('LOW') -end; +end --[[ ########################################################## PETBATTLE STYLER @@ -61,7 +44,7 @@ PETBATTLE STYLER local function PetBattleStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.petbattleui ~= true then return - end; + end local PetBattleFrame = _G["PetBattleFrame"]; local BottomFrame = PetBattleFrame.BottomFrame; local ActiveFramesList = { PetBattleFrame.ActiveAlly, PetBattleFrame.ActiveEnemy } @@ -122,7 +105,7 @@ local function PetBattleStyle() frame.FirstAttack:SetPoint("RIGHT", frame.HealthBarBackdrop, "LEFT", -5, 0) frame.FirstAttack:SetTexCoord(.5, 0, .5, 1) frame.FirstAttack:SetVertexColor(.1, .1, .1, 1) - end; + end frame.HealthText:ClearAllPoints() frame.HealthText:SetPoint('CENTER', frame.HealthBarBackdrop, 'CENTER') frame.PetType:ClearAllPoints() @@ -141,7 +124,7 @@ local function PetBattleStyle() end frame.isStyled = true end - end; + end for _, frame in pairs(StandardFramesList) do if(not frame.hasTempBG) then @@ -174,7 +157,7 @@ local function PetBattleStyle() frame.HealthBarBackdrop:Point('BOTTOMLEFT', frame.ActualHealthBar, 'BOTTOMLEFT', -1, -1) frame.hasTempBG = true end - end; + end PetBattleActionBar:SetParent(PetBattleFrame) PetBattleActionBar:SetSize(PBAB_WIDTH, PBAB_HEIGHT) @@ -186,11 +169,6 @@ local function PetBattleStyle() PetBattleFrame.TopVersusText:ClearAllPoints() PetBattleFrame.TopVersusText:SetPoint("TOP", PetBattleFrame, "TOP", 0, -42) - PetBattleSetTooltip(PetBattlePrimaryAbilityTooltip) - PetBattleSetTooltip(PetBattlePrimaryUnitTooltip) - PetBattleSetTooltip(BattlePetTooltip) - PetBattleSetTooltip(FloatingBattlePetTooltip) - PetBattleSetTooltip(FloatingPetBattleAbilityTooltip) PetBattleFrame.Ally2:SetPoint("TOPRIGHT", PetBattleFrame.Ally2.iconPoint, "TOPLEFT", -6, -2) PetBattleFrame.Ally3:SetPoint('TOPRIGHT', PetBattleFrame.Ally2, 'TOPLEFT', -8, 0) @@ -234,7 +212,7 @@ local function PetBattleStyle() pet.DeadOverlay:SetAlpha(0) pet.Level:SetAlpha(0) pet.HealthText:SetAlpha(0) - end; + end PetBattleQueueReadyFrame:Formula409() PetBattleQueueReadyFrame:SetPanelTemplate("Transparent", true) @@ -248,7 +226,7 @@ local function PetBattleStyle() PetBattleFrame.ActiveAlly.FirstAttack:Hide() PetBattleFrame.ActiveEnemy.FirstAttack:Hide() return - end; + end PetBattleFrame.ActiveAlly.FirstAttack:Show() if PetBattleFrame.ActiveAlly.SpeedIcon:IsShown() then PetBattleFrame.ActiveAlly.FirstAttack:SetVertexColor(0, 1, 0, 1) @@ -289,18 +267,18 @@ local function PetBattleStyle() frame.Icon:FillInner(frame.Panel, 2, 2) frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) frame.isStyled = true - end; + end if isBuff then frame:SetBackdropBorderColor(0, 1, 0) else frame:SetBackdropBorderColor(1, 0, 0) - end; + end frame.Duration:SetFont(SuperVillain.Media.font.numbers, 16, "OUTLINE") frame.Duration:ClearAllPoints() frame.Duration:SetPoint("BOTTOMLEFT", frame.Icon, "BOTTOMLEFT", 4, 4) if turnsRemaining > 0 then frame.Duration:SetText(turnsRemaining) - end; + end nextFrame = nextFrame + 1 end end @@ -366,7 +344,9 @@ local function PetBattleStyle() self.BottomFrame.ForfeitButton:SetPoint("LEFT", self.BottomFrame.CatchButton, "RIGHT", 10, 0) PetBattleButtonHelper(self.BottomFrame.ForfeitButton) end) -end; + + SuperVillain.SVTip:ReLoad() +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua index 3156060..ed9ec47 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua @@ -25,25 +25,30 @@ PVP STYLER local function PVPFrameStyle() if (SuperVillain.db.SVStyle and (SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.pvp ~= true)) then return - end; + end + PVPUIFrame:Formula409() PVPUIFrame:SetPanelTemplate("Action") PVPUIFrame.Shadows:Formula409() STYLE:ApplyCloseButtonStyle(PVPUIFrameCloseButton) + for g = 1, 2 do STYLE:ApplyTabStyle(_G["PVPUIFrameTab"..g]) - end; - for g = 1, 3 do - local M = _G["PVPQueueFrameCategoryButton"..g]M:SetFixedPanelTemplate("Button") - M.Background:MUNG() - M.Ring:MUNG() - M.Icon:Size(45) - M.Icon:SetTexCoord(.15, .85, .15, .85) - M.Panel:WrapOuter(M.Icon) - M.Panel:SetFrameLevel(M:GetFrameLevel()) - M.Icon:SetDrawLayer("OVERLAY", nil, 7) - M:SetButtonTemplate() - end; + end + + for i = 1, 3 do + local btn = _G["PVPQueueFrameCategoryButton"..i] + if(btn) then + btn.Background:MUNG() + btn.Ring:MUNG() + btn:SetButtonTemplate() + btn.Icon:Size(45) + btn.Icon:SetTexCoord(.15, .85, .15, .85) + btn.Icon:SetDrawLayer("OVERLAY", nil, 7) + btn.Panel:WrapOuter(btn.Icon) + end + end + STYLE:ApplyDropdownStyle(HonorFrameTypeDropDown) HonorFrame.Inset:Formula409() HonorFrame.Inset:SetFixedPanelTemplate("Inset") @@ -88,7 +93,7 @@ local function PVPFrameStyle() I:SetButtonTemplate() I.SelectedTexture:FillInner() I.SelectedTexture:SetTexture(1, 1, 0, 0.1) - end; + end ConquestFrame.Inset:Formula409() ConquestPointsBarLeft:MUNG() ConquestPointsBarRight:MUNG() @@ -140,7 +145,7 @@ local function PVPFrameStyle() self:SetHeight(100) end end) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua index 1a1f7f2..70e580d 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua @@ -674,18 +674,21 @@ local function SystemPanelQue() end OpacityFrame:Formula409() OpacityFrame:SetFixedPanelTemplate("Transparent", true) + for i = 1, #SystemFrameList7 do local this = _G[SystemFrameList7[i]] if(this) then this:Formula409() end end + for i = 1, #SystemFrameList8 do local this = _G[SystemFrameList8[i]] if(this) then this:SetButtonTemplate() end end + ChatConfigFrameOkayButton:Point("RIGHT", ChatConfigFrameCancelButton, "RIGHT", -11, -1) ChatConfigCombatSettingsFiltersDeleteButton:Point("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", 0, -1) ChatConfigCombatSettingsFiltersAddFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -1, 0) @@ -697,14 +700,16 @@ local function SystemPanelQue() end end CombatConfigSettingsNameEditBox:SetEditboxTemplate() - ChatConfigFrame:SetPanelTemplate("Pattern", true) + ChatConfigFrame:SetPanelTemplate("Halftone", true) + for i = 1, #SystemFrameList9 do local this = _G[SystemFrameList9[i]] if(this) then this:Formula409() - this:SetFixedPanelTemplate("Inset", true) + STYLE:SetBasicBG(this) end end + for i = 1, #SystemFrameList10 do local this = _G[SystemFrameList10[i]] if(this) then @@ -716,6 +721,7 @@ local function SystemPanelQue() end end end + ChatConfigChannelSettingsLeft:RegisterEvent("PLAYER_ENTERING_WORLD") ChatConfigChannelSettingsLeft:SetScript("OnEvent", function(self, event) ChatConfigChannelSettingsLeft:UnregisterEvent("PLAYER_ENTERING_WORLD") @@ -868,26 +874,22 @@ local function SystemPanelQue() BattleTagInviteFrame:Formula409() BattleTagInviteFrame:SetFixedPanelTemplate('Transparent') BattleTagInviteFrameScrollFrame:SetEditboxTemplate() + for i=1, BattleTagInviteFrame:GetNumChildren() do local child = select(i, BattleTagInviteFrame:GetChildren()) if child:GetObjectType() == 'Button' then child:SetButtonTemplate() end end + for i = 1, #SystemFrameList13 do local this = _G[SystemFrameList13[i]] if(this) then this:Formula409() - this:SetFixedPanelTemplate("Inset") - if this ~= _G["VideoOptionsFramePanelContainer"] and this ~= _G["InterfaceOptionsFramePanelContainer"] then - this.Panel:Point("TOPLEFT",-1,0) - this.Panel:Point("BOTTOMRIGHT",0,1) - else - this.Panel:Point("TOPLEFT", 0, 0) - this.Panel:Point("BOTTOMRIGHT", 0, 0) - end + STYLE:SetBasicBG(this) end end + for i = 1, #SystemFrameList14 do local this = _G[SystemFrameList14[i]] if(this) then @@ -895,6 +897,7 @@ local function SystemPanelQue() STYLE:ApplyTabStyle(this) end end + InterfaceOptionsFrameTab1:ClearAllPoints() InterfaceOptionsFrameTab1:SetPoint("BOTTOMLEFT",InterfaceOptionsFrameCategories,"TOPLEFT",-11,-2) VideoOptionsFrameDefaults:ClearAllPoints() @@ -925,7 +928,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList18 do local this = _G[SystemFrameList18[i]] if(this) then - STYLE:ApplyDropdownStyle(this,165) + STYLE:ApplyDropdownStyle(this, 165) end end for i = 1, #SystemFrameList19 do diff --git a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua index a282f53..c48c717 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua @@ -95,6 +95,37 @@ end CORE FUNCTIONS ########################################################## ]]-- +function STYLE:SetBasicBG(this) + if(not this or (this and this.BasicBG)) then return end + + local currentLevel = this:GetFrameLevel() + if(currentLevel == 0) then + currentLevel = 1 + end + + local bg = CreateFrame("Frame", nil, this) + bg:SetAllPoints(this) + bg:SetFrameLevel(currentLevel - 1) + bg:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeSize = 1, + insets = + { + left = 1, + right = 1, + top = 1, + bottom = 1, + }, + }) + bg:SetBackdropColor(0,0,0,0.5) + bg:SetBackdropBorderColor(0,0,0) + + this.BasicBG = true +end + function STYLE:ApplyFrameStyle(this, template, noStripping, fullStripping) if(not this or (this and this.Panel)) then return end if not noStripping then this:Formula409(fullStripping) end @@ -180,7 +211,7 @@ function STYLE:ApplyScrollStyle(this) this.styledBackground = CreateFrame("Frame", nil, this) this.styledBackground:Point("TOPLEFT", _G[this:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1) this.styledBackground:Point("BOTTOMRIGHT", _G[this:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1) - this.styledBackground:SetPanelTemplate("Inset", true) + STYLE:SetBasicBG(this.styledBackground) end this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") end @@ -188,29 +219,51 @@ function STYLE:ApplyScrollStyle(this) end function STYLE:ApplyScrollbarStyle(this) - if(not this or (this and this.appliedStyle)) then return end + if(not this or (this and this.appliedStyle)) then return end + this:Formula409() - this:SetFixedPanelTemplate("Inset") - hooksecurefunc(this, "SetBackdrop", function(f, backdrop) - if backdrop ~= nil then - f:SetBackdrop(nil) - end - end) this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - if this:GetOrientation() == "VERTICAL"then + + if(this:GetOrientation() == "VERTICAL") then this:Width(12) else this:Height(12) - for i=1, this:GetNumRegions()do + for i=1, this:GetNumRegions() do local child = select(i, this:GetRegions()) - if child and child:GetObjectType() == "FontString" then + if(child and child:GetObjectType() == "FontString") then local anchor, parent, relative, x, y = child:GetPoint() - if relative:find("BOTTOM")then + if relative:find("BOTTOM") then child:Point(anchor, parent, relative, x, y - 4) end end end end + + local currentLevel = this:GetFrameLevel() + if(currentLevel == 0) then + currentLevel = 1 + end + + local bg = CreateFrame("Frame", nil, this) + bg:SetAllPoints(this) + bg:SetFrameLevel(currentLevel) + bg:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeSize = 1, + insets = + { + left = 1, + right = 1, + top = 1, + bottom = 1, + }, + }) + bg:SetBackdropColor(0,0,0) + bg:SetBackdropBorderColor(0.2,0.2,0.2) + this.appliedStyle = true end @@ -282,72 +335,118 @@ function STYLE:ApplyTabStyle(this, full) end function STYLE:ApplyPaginationStyle(button, isVertical) - if(not button or not button:GetName() or (button and button.appliedStyle)) then return end - local c,d,e; - local leftDown = (button:GetName() and find(button:GetName():lower(),'left')) or find(button:GetName():lower(),'prev') or find(button:GetName():lower(),'decrement') + if(not button or (button and not button:GetName()) or (button and button.appliedStyle)) then return end + + local bName = button:GetName() + local testName = bName:lower() + local leftDown = ((bName and testName:find('left')) or testName:find('prev') or testName:find('decrement')) or false + button:Formula409() - button:SetNormalTexture(nil) - button:SetPushedTexture(nil) - button:SetHighlightTexture(nil) - button:SetDisabledTexture(nil) + button:SetNormalTexture(0,0,0,0) + button:SetPushedTexture(0,0,0,0) + button:SetHighlightTexture(0,0,0,0) + button:SetDisabledTexture(0,0,0,0) + + button:SetButtonTemplate() + button:Size((button:GetWidth() - 7), (button:GetHeight() - 7)) + if not button.icon then - button.icon=button:CreateTexture(nil,'ARTWORK') + button.icon = button:CreateTexture(nil,'ARTWORK') button.icon:Size(13) button.icon:SetPoint('CENTER') button.icon:SetTexture([[Interface\Buttons\SquareButtonTextures]]) - button.icon:SetTexCoord(0.01562500,0.20312500,0.01562500,0.20312500) - button:SetScript('OnMouseDown',function(g) - if g:IsEnabled()then - g.icon:SetPoint("CENTER",-1,-1) + button.icon:SetTexCoord(0.02, 0.2, 0.02, 0.2) + + button:SetScript('OnMouseDown',function(self) + if self:IsEnabled() then + self.icon:SetPoint("CENTER",-1,-1) end end) - button:SetScript('OnMouseUp',function(g) - g.icon:SetPoint("CENTER",0,0) + + button:SetScript('OnMouseUp',function(self) + self.icon:SetPoint("CENTER",0,0) end) - button:SetScript('OnDisable',function(g) - SetDesaturation(g.icon,true) - g.icon:SetAlpha(0.5) + + button:SetScript('OnDisable',function(self) + SetDesaturation(self.icon, true) + self.icon:SetAlpha(0.5) end) - button:SetScript('OnEnable',function(g) - SetDesaturation(g.icon,false) - g.icon:SetAlpha(1.0) + + button:SetScript('OnEnable',function(self) + SetDesaturation(self.icon, false) + self.icon:SetAlpha(1.0) end) - if not button:IsEnabled()then + + if not button:IsEnabled() then button:GetScript('OnDisable')(button) end - end + end + if isVertical then - if leftDown then SquareButton_SetIcon(button,'UP')else SquareButton_SetIcon(button,'DOWN')end + if leftDown then SquareButton_SetIcon(button,'UP') else SquareButton_SetIcon(button,'DOWN')end else - if leftDown then SquareButton_SetIcon(button,'LEFT')else SquareButton_SetIcon(button,'RIGHT')end - end - button:SetButtonTemplate() - button:Size((button:GetWidth() - 7),(button:GetHeight() - 7)) + if leftDown then SquareButton_SetIcon(button,'LEFT') else SquareButton_SetIcon(button,'RIGHT')end + end + button.appliedStyle = true end function STYLE:ApplyDropdownStyle(this, width) if(not this or (this and this.appliedStyle)) then return end - local ddname = this:GetName(); - local button = _G[this:GetName().."Button"] + + local ddName = this:GetName(); + local ddText = _G[ddName.."Text"] + local ddButton = _G[ddName.."Button"] + if not width then width = 155 end + this:Formula409() this:Width(width) - _G[ddname.."Text"]:ClearAllPoints() - _G[ddname.."Text"]:Point("RIGHT", button, "LEFT", -2, 0) - button:ClearAllPoints() - button:Point("RIGHT", this, "RIGHT", -10, 3) - hooksecurefunc(button, "SetPoint", function(this, _, _, _, _, _, breaker) - if not breaker then - button:ClearAllPoints() - button:Point("RIGHT", this, "RIGHT", -10, 3, true) - end - end) - STYLE:ApplyPaginationStyle(button, true) - local bg = CreateFrame("Frame", nil, this) - bg:Point("TOPLEFT", this, "TOPLEFT", 20, -2) - bg:Point("BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) - bg:SetPanelTemplate("FramedBottom") + + if(ddButton) then + if(ddText) then + ddText:SetPoint("RIGHT", ddButton, "LEFT", -2, 0) + end + + ddButton:ClearAllPoints() + ddButton:Point("RIGHT", this, "RIGHT", -10, 3) + ddButton.AnchorParent = this + + hooksecurefunc(ddButton, "SetPoint", function(self, _, _, _, _, _, breaker) + if not breaker then + self:Point("RIGHT", self.AnchorParent, "RIGHT", -10, 3, true) + end + end) + + STYLE:ApplyPaginationStyle(ddButton, true) + + local currentLevel = this:GetFrameLevel() + if(currentLevel == 0) then + currentLevel = 1 + end + + local bg = CreateFrame("Frame", nil, this) + bg:Point("TOPLEFT", this, "TOPLEFT", 20, -2) + bg:Point("BOTTOMRIGHT", ddButton, "BOTTOMRIGHT", 2, -2) + bg:SetFrameLevel(currentLevel - 1) + bg:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeSize = 1, + insets = + { + left = 1, + right = 1, + top = 1, + bottom = 1, + }, + }) + bg:SetBackdropColor(0,0,0,0.75) + bg:SetBackdropBorderColor(0.2,0.2,0.2) + end + this.appliedStyle = true end