diff --git a/FreeUI/core/api.lua b/FreeUI/core/api.lua index 1a89c2d9..4b348182 100644 --- a/FreeUI/core/api.lua +++ b/FreeUI/core/api.lua @@ -41,15 +41,15 @@ C.classcolours = { ["DEATHKNIGHT"] = {r = 0.77, g = 0.12, b = 0.23}, ["DEMONHUNTER"] = {r = 0.64, g = 0.19, b = 0.79}, ["DRUID"] = {r = 1, g = 0.49, b = 0.04}, - ["HUNTER"] = {r = 0.58, g = 0.86, b = 0.49}, - ["MAGE"] = {r = 0, g = 0.76, b = 1}, - ["MONK"] = {r = 0.0, g = 1.00 , b = 0.59}, - ["PALADIN"] = {r = 1, g = 0.22, b = 0.52}, - ["PRIEST"] = {r = 0.8, g = 0.87, b = .9}, - ["ROGUE"] = {r = 1, g = 0.91, b = 0.2}, - ["SHAMAN"] = {r = 0, g = 0.6, b = 0.6}, - ["WARLOCK"] = {r = 0.6, g = 0.47, b = 0.85}, - ["WARRIOR"] = {r = 0.9, g = 0.65, b = 0.45}, + ["HUNTER"] = {r = 0.67, g = 0.83, b = 0.45}, + ["MAGE"] = {r = 0.41, g = 0.80, b = 0.94}, + ["MONK"] = {r = 0.43, g = 1 , b = 0.50}, + ["PALADIN"] = {r = 0.96, g = 0.55, b = 0.73}, + ["PRIEST"] = {r = 1, g = 1, b = 1}, + ["ROGUE"] = {r = 1, g = 0.96, b = 0.41}, + ["SHAMAN"] = {r = 0, g = 0.44, b = 0.87}, + ["WARLOCK"] = {r = 0.58, g = 0.51, b = 0.79}, + ["WARRIOR"] = {r = 0.78, g = 0.61, b = 0.43}, } local _, class = UnitClass("player") @@ -184,13 +184,14 @@ F.CreatePulse = function(frame) -- pulse function originally by nightcracker end local r, g, b = unpack(C.class) -local buttonR, buttonG, buttonB, buttonA = .3, .3, .3, .3 +local buttonR, buttonG, buttonB, buttonA = .06, .06, .06, .8 local CreateGradient = function(f) local tex = f:CreateTexture(nil, "BORDER") tex:SetPoint("TOPLEFT", 1, -1) tex:SetPoint("BOTTOMRIGHT", -1, 1) - tex:SetTexture(C.media.gradient) + tex:SetTexture(C.media.backdrop) +-- tex:SetGradientAlpha("VERTICAL", 0, 0, 0, .3, .35, .35, .35, .35) tex:SetVertexColor(buttonR, buttonG, buttonB, buttonA) return tex @@ -198,19 +199,22 @@ end F.CreateGradient = CreateGradient -local function colourButton(f) +local function StartGlow(f) if not f:IsEnabled() then return end - - f:SetBackdropColor(r, g, b, buttonA) + f:SetBackdropColor(r, g, b, .1) f:SetBackdropBorderColor(r, g, b) + f.glow:SetAlpha(1) + F.CreatePulse(f.glow) end -local function clearButton(f) +local function StopGlow(f) f:SetBackdropColor(0, 0, 0, 0) f:SetBackdropBorderColor(0, 0, 0) + f.glow:SetScript("OnUpdate", nil) + f.glow:SetAlpha(0) end -F.Reskin = function(f, noHighlight) +F.Reskin = function(f, noGlow) f:SetNormalTexture("") f:SetHighlightTexture("") f:SetPushedTexture("") @@ -224,11 +228,21 @@ F.Reskin = function(f, noHighlight) F.CreateBD(f, 0) - f.tex = CreateGradient(f) + CreateGradient(f) - if not noHighlight then - f:HookScript("OnEnter", colourButton) - f:HookScript("OnLeave", clearButton) + if not noGlow then + f.glow = CreateFrame("Frame", nil, f) + f.glow:SetBackdrop({ + edgeFile = C.media.glow, + edgeSize = 5, + }) + f.glow:SetPoint("TOPLEFT", -6, 6) + f.glow:SetPoint("BOTTOMRIGHT", 6, -6) + f.glow:SetBackdropBorderColor(r, g, b) + f.glow:SetAlpha(0) + + f:HookScript("OnEnter", StartGlow) + f:HookScript("OnLeave", StopGlow) end end @@ -258,16 +272,27 @@ local function clearScroll(f) f.tex:SetVertexColor(1, 1, 1) end -F.ReskinScroll = function(f) +F.ReskinScroll = function(f, parent) local frame = f:GetName() - if _G[frame.."Track"] then _G[frame.."Track"]:Hide() end - if _G[frame.."BG"] then _G[frame.."BG"]:Hide() end - if _G[frame.."Top"] then _G[frame.."Top"]:Hide() end - if _G[frame.."Middle"] then _G[frame.."Middle"]:Hide() end - if _G[frame.."Bottom"] then _G[frame.."Bottom"]:Hide() end + if frame then + if _G[frame.."Track"] then _G[frame.."Track"]:Hide() end + if _G[frame.."BG"] then _G[frame.."BG"]:Hide() end + if _G[frame.."Top"] then _G[frame.."Top"]:Hide() end + if _G[frame.."Middle"] then _G[frame.."Middle"]:Hide() end + if _G[frame.."Bottom"] then _G[frame.."Bottom"]:Hide() end + else + if f.trackBG then f.trackBG:Hide() end + if f.Background then f.Background:Hide() end + if f.Top then f.Top:Hide() end + if f.Middle then f.Middle:Hide() end + if f.Bottom then f.Bottom:Hide() end + if f.ScrollBarTop then f.ScrollBarTop:Hide() end + if f.ScrollBarMiddle then f.ScrollBarMiddle:Hide() end + if f.ScrollBarBottom then f.ScrollBarBottom:Hide() end + end - local bu = _G[frame.."ThumbTexture"] + local bu = f.ThumbTexture or f.thumbTexture or _G[frame.."ThumbTexture"] bu:SetAlpha(0) bu:SetWidth(17) @@ -280,8 +305,8 @@ F.ReskinScroll = function(f) tex:SetPoint("TOPLEFT", bu.bg, 1, -1) tex:SetPoint("BOTTOMRIGHT", bu.bg, -1, 1) - local up = _G[frame.."ScrollUpButton"] - local down = _G[frame.."ScrollDownButton"] + local up = f.ScrollUpButton or f.UpButton or _G[(frame or parent).."ScrollUpButton"] + local down = f.ScrollDownButton or f.DownButton or _G[(frame or parent).."ScrollDownButton"] up:SetWidth(17) down:SetWidth(17) @@ -343,11 +368,21 @@ F.ReskinDropDown = function(f) if middle then middle:SetAlpha(0) end if right then right:SetAlpha(0) end - local down = _G[frame.."Button"] + local bg = CreateFrame("Frame", nil, f) + bg:SetPoint("TOPLEFT", 10, -4) + bg:SetPoint("BOTTOMRIGHT", -12, 8) + bg:SetFrameLevel(f:GetFrameLevel()-1) + F.CreateBD(bg, 0) + + local gradient = F.CreateGradient(f) + gradient:SetPoint("TOPLEFT", bg, 1, -1) + gradient:SetPoint("BOTTOMRIGHT", bg, -1, 1) + + local down = _G[frame.."Button"] down:SetSize(20, 20) down:ClearAllPoints() - down:SetPoint("RIGHT", -18, 2) + down:SetPoint("TOPRIGHT", bg) F.Reskin(down, true) @@ -367,15 +402,6 @@ F.ReskinDropDown = function(f) down:HookScript("OnEnter", colourArrow) down:HookScript("OnLeave", clearArrow) - local bg = CreateFrame("Frame", nil, f) - bg:SetPoint("TOPLEFT", 16, -4) - bg:SetPoint("BOTTOMRIGHT", -18, 8) - bg:SetFrameLevel(f:GetFrameLevel()-1) - F.CreateBD(bg, 0) - - local gradient = CreateGradient(f) - gradient:SetPoint("TOPLEFT", bg, 1, -1) - gradient:SetPoint("BOTTOMRIGHT", bg, -1, 1) end local function colourClose(f) @@ -611,20 +637,23 @@ end F.ReskinPortraitFrame = function(f, isButtonFrame) local name = f:GetName() - _G[name.."Bg"]:Hide() + f.Bg:Hide() _G[name.."TitleBg"]:Hide() - _G[name.."Portrait"]:Hide() - _G[name.."PortraitFrame"]:Hide() + f.portrait:Hide() + f.portraitFrame:Hide() _G[name.."TopRightCorner"]:Hide() - _G[name.."TopLeftCorner"]:Hide() - _G[name.."TopBorder"]:Hide() - _G[name.."TopTileStreaks"]:SetTexture("") + f.topLeftCorner:Hide() + f.topBorderBar:Hide() + f.TopTileStreaks:SetTexture("") _G[name.."BotLeftCorner"]:Hide() _G[name.."BotRightCorner"]:Hide() _G[name.."BottomBorder"]:Hide() - _G[name.."LeftBorder"]:Hide() + f.leftBorderBar:Hide() _G[name.."RightBorder"]:Hide() + F.ReskinClose(f.CloseButton) + f.portrait.Show = F.dummy + if isButtonFrame then _G[name.."BtnCornerLeft"]:SetTexture("") _G[name.."BtnCornerRight"]:SetTexture("") @@ -635,7 +664,7 @@ F.ReskinPortraitFrame = function(f, isButtonFrame) end F.CreateBD(f) - F.ReskinClose(_G[name.."CloseButton"]) + F.CreateSD(f) end F.CreateBDFrame = function(f, a) @@ -746,3 +775,4 @@ F.ReskinIcon = function(icon) icon:SetTexCoord(.08, .92, .08, .92) return F.CreateBG(icon) end + diff --git a/FreeUI/scripts/bags.lua b/FreeUI/scripts/bags.lua index 68d35df4..a48d8931 100644 --- a/FreeUI/scripts/bags.lua +++ b/FreeUI/scripts/bags.lua @@ -70,6 +70,7 @@ local RestyleButton = function(bu) bu:SetSize(C.bags.size, C.bags.size) border:SetTexture(C.media.backdrop) + border.SetTexture = F.dummy if bu.restyled then return end diff --git a/FreeUI/scripts/buffs.lua b/FreeUI/scripts/buffs.lua index 8083a1f3..2f979e16 100755 --- a/FreeUI/scripts/buffs.lua +++ b/FreeUI/scripts/buffs.lua @@ -81,6 +81,7 @@ f:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -30, -30) BuffFrame:SetParent(f) BuffFrame:ClearAllPoints() BuffFrame:SetPoint("TOPRIGHT") +BuffFrame.SetPoint = F.dummy for i = 1, NUM_TEMP_ENCHANT_FRAMES do local bu = _G["TempEnchant"..i] diff --git a/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua b/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua index aab12c1d..04456dcd 100644 --- a/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua +++ b/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua @@ -15,6 +15,7 @@ C.themes["Blizzard_AchievementUI"] = function() for i = 1, 4 do select(i, AchievementFrameHeader:GetRegions()):Hide() end + AchievementFrameHeaderLeftDDLInset:SetAlpha(0) AchievementFrameHeaderRightDDLInset:SetAlpha(0) select(2, AchievementFrameAchievements:GetChildren()):Hide() AchievementFrameAchievementsBackground:Hide() @@ -57,9 +58,36 @@ C.themes["Blizzard_AchievementUI"] = function() end AchievementFrameHeaderPoints:SetPoint("TOP", AchievementFrame, "TOP", 0, -6) - AchievementFrameFilterDropDown:SetPoint("TOPRIGHT", AchievementFrame, "TOPRIGHT", -98, 1) + AchievementFrameFilterDropDown:SetPoint("TOPLEFT", 148, 1) + AchievementFrameFilterDropDown:SetPoint("TOPLEFT", 148, 1) + AchievementFrame.searchBox:ClearAllPoints() + AchievementFrame.searchBox:SetPoint("TOPRIGHT", -98, -3) + F.ReskinInput(AchievementFrame.searchBox, 20) + + local function SkinSearchPreview(btn) + btn:SetNormalTexture(C.media.backdrop) + btn:GetNormalTexture():SetVertexColor(0.1, 0.1, 0.1, .9) + btn:SetPushedTexture(C.media.backdrop) + btn:GetPushedTexture():SetVertexColor(0.1, 0.1, 0.1, .9) + end + for i = 1, 5 do + local btn = AchievementFrame["searchPreview"..i] + SkinSearchPreview(btn) + btn.iconFrame:SetAlpha(0) + F.ReskinIcon(btn.icon) + end + SkinSearchPreview(AchievementFrame.showAllSearchResults) + + local prevContainer = AchievementFrame.searchPreviewContainer + prevContainer:DisableDrawLayer("OVERLAY") + local bg = _G.CreateFrame("Frame", nil, prevContainer) + bg:SetPoint("TOPRIGHT", 1, 1) + bg:SetPoint("BOTTOMLEFT", prevContainer.borderAnchor, 6, 4) + bg:SetFrameLevel(prevContainer:GetFrameLevel() - 1) + F.CreateBD(bg) AchievementFrameFilterDropDownText:ClearAllPoints() AchievementFrameFilterDropDownText:SetPoint("CENTER", -10, 1) + F.ReskinDropDown(AchievementFrameFilterDropDown) AchievementFrameSummaryCategoriesStatusBar:SetStatusBarTexture(C.media.backdrop) AchievementFrameSummaryCategoriesStatusBar:GetStatusBarTexture():SetGradient("VERTICAL", 0, .4, 0, 0, .6, 0) @@ -369,5 +397,4 @@ C.themes["Blizzard_AchievementUI"] = function() F.ReskinScroll(AchievementFrameStatsContainerScrollBar) F.ReskinScroll(AchievementFrameCategoriesContainerScrollBar) F.ReskinScroll(AchievementFrameComparisonContainerScrollBar) - F.ReskinDropDown(AchievementFrameFilterDropDown) end diff --git a/FreeUI/theme/AddOns/Blizzard_EncounterJournal.lua b/FreeUI/theme/AddOns/Blizzard_EncounterJournal.lua index 861b8518..7417601b 100644 --- a/FreeUI/theme/AddOns/Blizzard_EncounterJournal.lua +++ b/FreeUI/theme/AddOns/Blizzard_EncounterJournal.lua @@ -15,19 +15,24 @@ C.themes["Blizzard_EncounterJournal"] = function() EncounterJournalInsetBg:Hide() EncounterJournalEncounterFrameInfoModelFrameShadow:Hide() EncounterJournalEncounterFrameInfoModelFrame.dungeonBG:Hide() - EncounterJournalEncounterFrameInfoDifficultyUpLeft:SetAlpha(0) - EncounterJournalEncounterFrameInfoDifficultyUpRIGHT:SetAlpha(0) - EncounterJournalEncounterFrameInfoDifficultyDownLeft:SetAlpha(0) - EncounterJournalEncounterFrameInfoDifficultyDownRIGHT:SetAlpha(0) + + EncounterJournalEncounterFrameInfoInstanceButton:Hide() + EncounterJournalEncounterFrameInfoInstanceButton.Show = function() end + select(5, EncounterJournalEncounterFrameInfoDifficulty:GetRegions()):Hide() select(6, EncounterJournalEncounterFrameInfoDifficulty:GetRegions()):Hide() - EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggleUpLeft:SetAlpha(0) - EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggleUpRIGHT:SetAlpha(0) - EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggleDownLeft:SetAlpha(0) - EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggleDownRIGHT:SetAlpha(0) + EncounterJournalEncounterFrameInfoDifficulty.UpLeft:SetAlpha(0) + EncounterJournalEncounterFrameInfoDifficulty.UpRight:SetAlpha(0) + EncounterJournalEncounterFrameInfoDifficulty.DownLeft:SetAlpha(0) + EncounterJournalEncounterFrameInfoDifficulty.DownRight:SetAlpha(0) + select(5, EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:GetRegions()):Hide() select(6, EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:GetRegions()):Hide() - + EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle.UpLeft:SetAlpha(0) + EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle.UpRight:SetAlpha(0) + EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle.DownLeft:SetAlpha(0) + EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle.DownRight:SetAlpha(0) + F.SetBD(EncounterJournal) -- [[ Dungeon / raid tabs ]] @@ -45,7 +50,7 @@ C.themes["Blizzard_EncounterJournal"] = function() self:GetFontString():SetTextColor(1, 1, 1) end - for _, tabName in pairs({"EncounterJournalInstanceSelectSuggestTab", "EncounterJournalInstanceSelectDungeonTab", "EncounterJournalInstanceSelectRaidTab"}) do + for _, tabName in pairs({"EncounterJournalInstanceSelectSuggestTab", "EncounterJournalInstanceSelectDungeonTab", "EncounterJournalInstanceSelectRaidTab", "EncounterJournalInstanceSelectLootJournalTab"}) do local tab = _G[tabName] local text = tab:GetFontString() @@ -71,7 +76,26 @@ C.themes["Blizzard_EncounterJournal"] = function() F.Reskin(tab) end - + + for _, EJ_Button in pairs({EncounterJournal.LootJournal.LegendariesFrame.ClassButton, EncounterJournal.LootJournal.LegendariesFrame.SlotButton, EncounterJournal.LootJournal.ItemSetsFrame.ClassButton}) do + EJ_Button.UpLeft:Hide() + EJ_Button.UpLeft.Show = function() end + EJ_Button.UpRight:Hide() + EJ_Button.UpRight.Show = function() end + EJ_Button.DownLeft:Hide() + EJ_Button.DownLeft.Show = function() end + EJ_Button.DownRight:Hide() + EJ_Button.DownRight.Show = function() end + EJ_Button.HighLeft:Hide() + EJ_Button.HighRight:Hide() + + local text = EJ_Button:GetFontString() + text:SetPoint("CENTER") + text:SetTextColor(1, 1, 1) + + F.Reskin(EJ_Button) + end + EncounterJournalInstanceSelectSuggestTab:SetBackdropColor(r, g, b, .2) -- [[ Side tabs ]] @@ -283,12 +307,6 @@ C.themes["Blizzard_EncounterJournal"] = function() F.CreateBD(EncounterJournalSearchResults) EncounterJournalSearchResults:SetBackdropColor(.15, .15, .15, .9) - EncounterJournalSearchBoxSearchButton1BotLeftCorner:Hide() - EncounterJournalSearchBoxSearchButton1BotRightCorner:Hide() - EncounterJournalSearchBoxSearchButton1BottomBorder:Hide() - EncounterJournalSearchBoxSearchButton1LeftBorder:Hide() - EncounterJournalSearchBoxSearchButton1RightBorder:Hide() - local function resultOnEnter(self) self.hl:Show() end @@ -520,8 +538,29 @@ C.themes["Blizzard_EncounterJournal"] = function() hooksecurefunc("EJSuggestFrame_UpdateRewards", function(suggestion) if suggestion.reward.data then + local texture = suggestion.reward.data.itemIcon or suggestion.reward.data.currencyIcon or 454046 + if ( suggestion.reward.data.isRewardTable ) then + texture = 454046 + end suggestion.reward.icon:SetMask(nil) suggestion.reward.icon:SetTexCoord(.08, .92, .08, .92) + suggestion.reward.icon:SetTexture(texture) end end) + + local bg = EncounterJournal.LootJournal:GetRegions() + bg:Hide() + + for k, bu in pairs(EncounterJournal.LootJournal.LegendariesFrame.buttons) do + bu.Background:Hide() + F.Reskin(bu) + F.CreateBG(bu.Icon) + bu.Icon:SetDrawLayer("ARTWORK") + end + for k, bu in pairs(EncounterJournal.LootJournal.LegendariesFrame.rightSideButtons) do + bu.Background:Hide() + F.Reskin(bu) + F.CreateBG(bu.Icon) + bu.Icon:SetDrawLayer("ARTWORK") + end end diff --git a/FreeUI/theme/AddOns/Blizzard_InspectUI.lua b/FreeUI/theme/AddOns/Blizzard_InspectUI.lua index 7ad71634..43bb35ef 100644 --- a/FreeUI/theme/AddOns/Blizzard_InspectUI.lua +++ b/FreeUI/theme/AddOns/Blizzard_InspectUI.lua @@ -44,12 +44,19 @@ C.themes["Blizzard_InspectUI"] = function() -- PvP InspectPVPFrame.BG:Hide() - - for i = 1, 3 do - local div = InspectPVPFrame["Div"..i] - - div:SetColorTexture(1, 1, 1, .2) - div:SetHeight(1) + + for tier = 1, MAX_PVP_TALENT_TIERS do + for column = 1, MAX_PVP_TALENT_COLUMNS do + local bu = InspectPVPFrame.Talents["Tier"..tier]["Talent"..column] + + bu.Slot:Hide() + bu.border:SetTexture("") + + bu.Icon:SetDrawLayer("ARTWORK") + bu.Icon:SetTexCoord(.08, .92, .08, .92) + + F.CreateBG(bu.Icon) + end end -- Talents @@ -132,36 +139,6 @@ C.themes["Blizzard_InspectUI"] = function() bottom:SetPoint("BOTTOMRIGHT", roleIcon, -2, 2) end - local function updateGlyph(self, clear) - local id = self:GetID() - local talentGroup = PlayerTalentFrame and PlayerTalentFrame.talentGroup - local enabled, glyphType, glyphTooltipIndex, glyphSpell, iconFilename = GetGlyphSocketInfo(id, talentGroup, true, INSPECTED_UNIT); - - if not glyphType then return end - - if enabled and glyphSpell and not clear then - if iconFilename then - self.glyph:SetTexture(iconFilename) - else - self.glyph:SetTexture("Interface\\Spellbook\\UI-Glyph-Rune1") - end - end - end - - hooksecurefunc("InspectGlyphFrameGlyph_UpdateSlot", updateGlyph) - - for i = 1, 6 do - local glyph = InspectTalentFrame.InspectGlyphs["Glyph"..i] - - glyph:HookScript("OnShow", updateGlyph) - - glyph.ring:Hide() - - glyph.glyph:SetDrawLayer("ARTWORK") - glyph.glyph:SetTexCoord(.08, .92, .08, .92) - F.CreateBDFrame(glyph.glyph, .25) - end - for i = 1, 4 do local tab = _G["InspectFrameTab"..i] F.ReskinTab(tab) diff --git a/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua b/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua index c31a057a..50bb9ccf 100644 --- a/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua +++ b/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua @@ -1,186 +1,111 @@ --- local F, C = unpack(select(2, ...)) - --- C.themes["Blizzard_TradeSkillUI"] = function() --- TradeSkillFramePortrait:Hide() --- TradeSkillFramePortrait.Show = F.dummy --- TradeSkillListScrollFrame:GetRegions():Hide() --- select(2, TradeSkillListScrollFrame:GetRegions()):Hide() --- TradeSkillDetailHeaderLeft:Hide() --- select(6, TradeSkillDetailScrollChildFrame:GetRegions()):Hide() --- TradeSkillDetailScrollFrameTop:SetAlpha(0) --- TradeSkillDetailScrollFrameBottom:SetAlpha(0) --- TradeSkillRankFrameBorder:Hide() --- TradeSkillRankFrameBackground:Hide() - --- TradeSkillDetailScrollFrame:SetHeight(176) --- TradeSkillLinkButton:SetPoint("LEFT", 0, -1) - --- F.Reskin(TradeSkillCreateButton) --- F.Reskin(TradeSkillCreateAllButton) --- F.Reskin(TradeSkillCancelButton) --- F.Reskin(TradeSkillViewGuildCraftersButton) --- F.ReskinFilterButton(TradeSkillFilterButton) - --- TradeSkillRankFrame:SetStatusBarTexture(C.media.backdrop) --- TradeSkillRankFrame.SetStatusBarColor = F.dummy --- TradeSkillRankFrame:GetStatusBarTexture():SetGradient("VERTICAL", .1, .3, .9, .2, .4, 1) - --- local bg = CreateFrame("Frame", nil, TradeSkillRankFrame) --- bg:SetPoint("TOPLEFT", -1, 1) --- bg:SetPoint("BOTTOMRIGHT", 1, -1) --- bg:SetFrameLevel(TradeSkillRankFrame:GetFrameLevel()-1) --- F.CreateBD(bg, .25) - --- for i = 1, MAX_TRADE_SKILL_REAGENTS do --- local bu = _G["TradeSkillReagent"..i] --- local ic = _G["TradeSkillReagent"..i.."IconTexture"] - --- _G["TradeSkillReagent"..i.."NameFrame"]:SetAlpha(0) - --- ic:SetTexCoord(.08, .92, .08, .92) --- ic:SetDrawLayer("ARTWORK") --- F.CreateBG(ic) - --- local bd = CreateFrame("Frame", nil, bu) --- bd:SetPoint("TOPLEFT", 39, -1) --- bd:SetPoint("BOTTOMRIGHT", 0, 1) --- bd:SetFrameLevel(0) --- F.CreateBD(bd, .25) - --- _G["TradeSkillReagent"..i.."Name"]:SetParent(bd) --- end - --- hooksecurefunc("TradeSkillFrame_SetSelection", function() --- local ic = TradeSkillSkillIcon:GetNormalTexture() --- if ic then --- ic:SetTexCoord(.08, .92, .08, .92) --- ic:SetPoint("TOPLEFT", 1, -1) --- ic:SetPoint("BOTTOMRIGHT", -1, 1) --- F.CreateBD(TradeSkillSkillIcon) --- else --- TradeSkillSkillIcon:SetBackdrop(nil) --- end --- end) - --- local colourExpandOrCollapse = F.colourExpandOrCollapse --- local clearExpandOrCollapse = F.clearExpandOrCollapse - --- local function styleSkillButton(skillButton) --- skillButton:SetNormalTexture("") --- skillButton.SetNormalTexture = F.dummy --- skillButton:SetPushedTexture("") - --- skillButton.bg = CreateFrame("Frame", nil, skillButton) --- skillButton.bg:SetSize(13, 13) --- skillButton.bg:SetPoint("LEFT", 4, 1) --- skillButton.bg:SetFrameLevel(skillButton:GetFrameLevel()-1) --- F.CreateBD(skillButton.bg, 0) - --- skillButton.tex = F.CreateGradient(skillButton) --- skillButton.tex:SetPoint("TOPLEFT", skillButton.bg, 1, -1) --- skillButton.tex:SetPoint("BOTTOMRIGHT", skillButton.bg, -1, 1) - --- skillButton.minus = skillButton:CreateTexture(nil, "OVERLAY") --- skillButton.minus:SetSize(7, 1) --- skillButton.minus:SetPoint("CENTER", skillButton.bg) --- skillButton.minus:SetTexture(C.media.backdrop) --- skillButton.minus:SetVertexColor(1, 1, 1) - --- skillButton.plus = skillButton:CreateTexture(nil, "OVERLAY") --- skillButton.plus:SetSize(1, 7) --- skillButton.plus:SetPoint("CENTER", skillButton.bg) --- skillButton.plus:SetTexture(C.media.backdrop) --- skillButton.plus:SetVertexColor(1, 1, 1) - --- skillButton:HookScript("OnEnter", colourExpandOrCollapse) --- skillButton:HookScript("OnLeave", clearExpandOrCollapse) --- end - --- styleSkillButton(TradeSkillCollapseAllButton) --- TradeSkillCollapseAllButton:SetDisabledTexture("") --- TradeSkillCollapseAllButton:SetHighlightTexture("") - --- hooksecurefunc("TradeSkillFrame_Update", function() --- local numTradeSkills = GetNumTradeSkills() --- local skillOffset = FauxScrollFrame_GetOffset(TradeSkillListScrollFrame) --- local _, skillIndex, skillType, isExpanded --- local diplayedSkills = TRADE_SKILLS_DISPLAYED --- local hasFilterBar = TradeSkillFilterBar:IsShown() --- if hasFilterBar then --- diplayedSkills = TRADE_SKILLS_DISPLAYED - 1 --- end --- local buttonIndex = 0 - --- for i = 1, diplayedSkills do --- skillIndex = i + skillOffset --- _, skillType, _, isExpanded = GetTradeSkillInfo(skillIndex) --- if hasFilterBar then --- buttonIndex = i + 1 --- else --- buttonIndex = i --- end - --- local skillButton = _G["TradeSkillSkill"..buttonIndex] - --- if not skillButton.styled then --- skillButton.styled = true - --- local buttonHighlight = _G["TradeSkillSkill"..buttonIndex.."Highlight"] --- buttonHighlight:SetTexture("") --- buttonHighlight.SetTexture = F.dummy - --- skillButton.SubSkillRankBar.BorderLeft:Hide() --- skillButton.SubSkillRankBar.BorderRight:Hide() --- skillButton.SubSkillRankBar.BorderMid:Hide() - --- skillButton.SubSkillRankBar:SetHeight(12) --- skillButton.SubSkillRankBar:SetStatusBarTexture(C.media.backdrop) --- skillButton.SubSkillRankBar:GetStatusBarTexture():SetGradient("VERTICAL", .1, .3, .9, .2, .4, 1) --- F.CreateBDFrame(skillButton.SubSkillRankBar, .25) - --- styleSkillButton(skillButton) --- end - --- if skillIndex <= numTradeSkills then --- if skillType == "header" or skillType == "subheader" then --- if skillType == "subheader" then --- skillButton.bg:SetPoint("LEFT", 24, 1) --- else --- skillButton.bg:SetPoint("LEFT", 4, 1) --- end - --- skillButton.bg:Show() --- skillButton.tex:Show() --- skillButton.minus:Show() --- if isExpanded then --- skillButton.plus:Hide() --- else --- skillButton.plus:Show() --- end --- else --- skillButton.bg:Hide() --- skillButton.tex:Hide() --- skillButton.minus:Hide() --- skillButton.plus:Hide() --- end --- end - --- if TradeSkillCollapseAllButton.collapsed == 1 then --- TradeSkillCollapseAllButton.plus:Show() --- else --- TradeSkillCollapseAllButton.plus:Hide() --- end --- end --- end) - --- TradeSkillIncrementButton:SetPoint("RIGHT", TradeSkillCreateButton, "LEFT", -9, 0) - --- F.ReskinPortraitFrame(TradeSkillFrame, true) --- F.ReskinScroll(TradeSkillDetailScrollFrameScrollBar) --- F.ReskinScroll(TradeSkillListScrollFrameScrollBar) --- F.ReskinInput(TradeSkillInputBox, nil, 33) --- F.ReskinInput(TradeSkillFrameSearchBox) --- F.ReskinArrow(TradeSkillDecrementButton, "left") --- F.ReskinArrow(TradeSkillIncrementButton, "right") --- F.ReskinArrow(TradeSkillLinkButton, "right") --- end +local F, C = unpack(select(2, ...)) + +C.themes["Blizzard_TradeSkillUI"] = function() + + F.ReskinPortraitFrame(TradeSkillFrame) + + local rankFrame = TradeSkillFrame.RankFrame + rankFrame.BorderLeft:Hide() + rankFrame.BorderRight:Hide() + rankFrame.BorderMid:Hide() + --rankFrame.Background:Hide() + rankFrame:SetStatusBarTexture(C.media.backdrop) + rankFrame.SetStatusBarColor = F.dummy + rankFrame:GetStatusBarTexture():SetGradient("VERTICAL", .1, .3, .9, .2, .4, 1) + F.CreateBDFrame(rankFrame) + + F.ReskinInput(TradeSkillFrame.SearchBox) + F.ReskinFilterButton(TradeSkillFrame.FilterButton) + TradeSkillFrame.FilterButton:SetPoint("TOPRIGHT", -7, -55) + + F.ReskinArrow(TradeSkillFrame.LinkToButton, "right") + TradeSkillFrame.LinkToButton:SetPoint("BOTTOMRIGHT", TradeSkillFrame.FilterButton, "TOPRIGHT", 0, 6) + + --[[ Recipe List ]]-- + local recipeInset = TradeSkillFrame.RecipeInset + recipeInset.Bg:Hide() + recipeInset:DisableDrawLayer("BORDER") + local recipeList = TradeSkillFrame.RecipeList + F.ReskinScroll(recipeList.scrollBar, "TradeSkillFrame") + for i = 1, #recipeList.Tabs do + for j = 1, 6 do + local region = select(j, recipeList.Tabs[i]:GetRegions()) + region:Hide() + region.Show = F.dummy + end + end + + hooksecurefunc(recipeList, "RefreshDisplay", function(self) + for i = 1, #self.buttons do + local tradeSkillButton = self.buttons[i] + if not tradeSkillButton._isSkinned then + local bg = CreateFrame("Frame", nil, tradeSkillButton) + F.CreateBD(bg, .0) + F.CreateGradient(bg) + bg:SetSize(15, 15) + bg:SetPoint("TOPLEFT", tradeSkillButton:GetNormalTexture()) + tradeSkillButton:SetHighlightTexture("") + tradeSkillButton:SetPushedTexture("") + tradeSkillButton:SetNormalTexture("") + tradeSkillButton.SetNormalTexture = function(self, texture) + if texture == "" then + bg:Hide() + else + bg:Show() + end + end + + tradeSkillButton.minus = bg:CreateTexture(nil, "ARTWORK") + tradeSkillButton.minus:SetSize(7, 1) + tradeSkillButton.minus:SetPoint("CENTER") + tradeSkillButton.minus:SetTexture(C.media.backdrop) + tradeSkillButton.minus:SetVertexColor(1, 1, 1) + + tradeSkillButton.plus = bg:CreateTexture(nil, "ARTWORK") + tradeSkillButton.plus:SetSize(1, 7) + tradeSkillButton.plus:SetPoint("CENTER") + tradeSkillButton.plus:SetTexture(C.media.backdrop) + tradeSkillButton.plus:SetVertexColor(1, 1, 1) + + tradeSkillButton:HookScript("OnEnter", F.colourExpandOrCollapse) + tradeSkillButton:HookScript("OnLeave", F.clearExpandOrCollapse) + + tradeSkillButton._isSkinned = true + end + end + end) + + --[[ Recipe Details ]]-- + local detailsInset = TradeSkillFrame.DetailsInset + detailsInset.Bg:Hide() + detailsInset:DisableDrawLayer("BORDER") + local detailsFrame = TradeSkillFrame.DetailsFrame + detailsFrame.Background:Hide() + F.ReskinScroll(detailsFrame.ScrollBar, "TradeSkillFrame") + F.Reskin(detailsFrame.CreateAllButton) + F.Reskin(detailsFrame.ViewGuildCraftersButton) + F.Reskin(detailsFrame.ExitButton) + F.Reskin(detailsFrame.CreateButton) + F.ReskinInput(detailsFrame.CreateMultipleInputBox) + detailsFrame.CreateMultipleInputBox:DisableDrawLayer("BACKGROUND") + F.ReskinArrow(detailsFrame.CreateMultipleInputBox.IncrementButton, "right") + F.ReskinArrow(detailsFrame.CreateMultipleInputBox.DecrementButton, "left") + + local contents = detailsFrame.Contents + contents.ResultIcon.Background:Hide() + hooksecurefunc(contents.ResultIcon, "SetNormalTexture", function(self) + if not self._isSkinned then + F.ReskinIcon(self:GetNormalTexture()) + self._isSkinned = true + end + end) + for i = 1, #contents.Reagents do + local reagent = contents.Reagents[i] + F.ReskinIcon(reagent.Icon) + reagent.NameFrame:Hide() + local bg = F.CreateBDFrame(reagent.NameFrame, .2) + bg:SetPoint("TOPLEFT", reagent.Icon, "TOPRIGHT", 2, 0) + bg:SetPoint("BOTTOMRIGHT", -4, 0) + end + +end