From 03c0396080fd4ff7d22909403b51b03f3c3d2a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20Stokb=C3=A6k?= Date: Thu, 21 Jul 2016 11:58:15 +0200 Subject: [PATCH 1/6] Changed colour code for Hunter, Mage, Monk, Paladin, Priest, Rogue, Shaman, Warlock and Warrior --- FreeUI/core/api.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/FreeUI/core/api.lua b/FreeUI/core/api.lua index 1a89c2d9..c4d8225f 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") From fe0662b2fce2643ec760f3893e8b8f78b82fbada Mon Sep 17 00:00:00 2001 From: Christoffer Stokbaek Date: Tue, 26 Jul 2016 15:17:18 +0200 Subject: [PATCH 2/6] Fix various skinning issues --- FreeUI/core/api.lua | 207 +++++++----- .../theme/AddOns/Blizzard_AchievementUI.lua | 34 +- FreeUI/theme/AddOns/Blizzard_InspectUI.lua | 53 +--- FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua | 297 +++++++----------- 4 files changed, 294 insertions(+), 297 deletions(-) diff --git a/FreeUI/core/api.lua b/FreeUI/core/api.lua index c4d8225f..bd1aeff8 100644 --- a/FreeUI/core/api.lua +++ b/FreeUI/core/api.lua @@ -7,22 +7,22 @@ C.media = { ["arrowDown"] = "Interface\\AddOns\\FreeUI\\media\\arrow-down-active", ["arrowLeft"] = "Interface\\AddOns\\FreeUI\\media\\arrow-left-active", ["arrowRight"] = "Interface\\AddOns\\FreeUI\\media\\arrow-right-active", - ["backdrop"] = "Interface\\ChatFrame\\ChatFrameBackground", -- default backdrop - ["checked"] = "Interface\\AddOns\\FreeUI\\media\\CheckButtonHilight", -- replace default checked texture - ["font"] = "Interface\\AddOns\\FreeUI\\media\\PFRondaSeven.ttf", -- default pixel font - ["font2"] = "Interface\\AddOns\\FreeUI\\media\\font.ttf", -- default font - ["glow"] = "Interface\\AddOns\\FreeUI\\media\\glowTex", -- glow/shadow texture + ["backdrop"] = "Interface\\AddOns\\FreeUI\\media\\blank", -- default backdrop + ["checked"] = "Interface\\AddOns\\FreeUI\\media\\CheckButtonHilight", -- replace default checked texture + ["font"] = "Interface\\AddOns\\FreeUI\\media\\pixel.ttf", -- default pixel font + ["font2"] = "Fonts\\FRIZQT__.ttf", -- default font + ["glow"] = "Interface\\AddOns\\FreeUI\\media\\glowTex", -- glow/shadow texture ["gradient"] = "Interface\\AddOns\\FreeUI\\media\\gradient", ["roleIcons"] = "Interface\\Addons\\FreeUI\\media\\UI-LFG-ICON-ROLES", - ["texture"] = "Interface\\AddOns\\FreeUI\\media\\statusbar", -- statusbar texture + ["texture"] = "Interface\\AddOns\\FreeUI\\media\\Texture1", -- statusbar texture } local mainFont if C.appearance.fontUseAlternativeFont then mainFont = C.media.font2 -elseif GetLocale() == "ruRU" then - mainFont = "Interface\\AddOns\\FreeUI\\media\\iFlash705.ttf" +elseif GetLocale() == "zhCN" then + mainFont = "Fonts\\ARKai_T.TTF" else mainFont = C.media.font end @@ -30,28 +30,39 @@ end F.AddOptionsCallback("appearance", "fontUseAlternativeFont", function() if C.appearance.fontUseAlternativeFont then mainFont = C.media.font2 - elseif GetLocale() == "ruRU" then - mainFont = "Interface\\AddOns\\FreeUI\\media\\iFlash705.ttf" + elseif GetLocale() == "zhCN" then + mainFont = "Fonts\\ARKai_T.TTF" else mainFont = C.media.font end end) C.classcolours = { - ["DEATHKNIGHT"] = {r = 0.77, g = 0.12, b = 0.23}, + ["DEATHKNIGHT"] = {r = 187/255, g = 0, b = 42/255}, ["DEMONHUNTER"] = {r = 0.64, g = 0.19, b = 0.79}, - ["DRUID"] = {r = 1, g = 0.49, b = 0.04}, - ["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}, + ["DRUID"] = {r = 0.94, g = 0.39, b = 0.1}, + ["HUNTER"] = {r = 126/255, g = 185/255, b = 18/255}, + ["MAGE"] = {r = 0.35, g = 0.76, b = 0.93}, + ["MONK"] = {r = 0.04, g = 0.85 , b = 0.53}, + ["PALADIN"] = {r = 241/255, g = 0, b = 168/255}, + ["PRIEST"] = {r = 219/255, g = 243/255, b = 1}, + ["ROGUE"] = {r = 1, g = 238/255, b = 0}, + ["SHAMAN"] = {r = 0.07, g = 0.42, b = 0.96}, + ["WARLOCK"] = {r = 136/255, g = 73/255, b = 223/255}, + ["WARRIOR"] = {r = 0.79, g = 0.61, b = 0.5}, } +FACTION_BAR_COLORS = { + [1] = {r = 0.63, g = 0, b = 0}, + [2] = {r = 0.63, g = 0, b = 0}, + [3] = {r = 0.63, g = 0, b = 0}, + [4] = {r = 0.82, g = 0.67, b = 0}, + [5] = {r = 0.32, g = 0.67, b = 0}, + [6] = {r = 0.32, g = 0.67, b = 0}, + [7] = {r = 0.32, g = 0.67, b = 0}, + [8] = {r = 0, g = 0.75, b = 0.44}, +}; + local _, class = UnitClass("player") if C.appearance.colourScheme == 2 then C.class = {C.appearance.customColour.r, C.appearance.customColour.g, C.appearance.customColour.b} @@ -94,8 +105,20 @@ local CreateBD = function(f, a) edgeFile = C.media.backdrop, edgeSize = 1, }) - f:SetBackdropColor(0, 0, 0, a or .5) + f:SetBackdropColor(.06, .06, .06, a or .9) f:SetBackdropBorderColor(0, 0, 0) + + if not a then + f.tex = f.tex or f:CreateTexture(nil, "BACKGROUND", nil, 1) + f.tex:SetTexture([[Interface\AddOns\FreeUI\media\StripesThin]], true, true) + f.tex:SetAlpha(.5) + f.tex:SetAllPoints() + f.tex:SetHorizTile(true) + f.tex:SetVertTile(true) + f.tex:SetBlendMode("ADD") + else + f:SetBackdropColor(0, 0, 0, a) + end end F.CreateBD = CreateBD @@ -115,16 +138,16 @@ end F.CreateSD = function(parent, size, r, g, b, alpha, offset) local sd = CreateFrame("Frame", nil, parent) - sd.size = size or 5 - sd.offset = offset or 0 + sd.size = size or 4 + sd.offset = offset or -1 sd:SetBackdrop({ edgeFile = C.media.glow, edgeSize = sd.size, }) - sd:SetPoint("TOPLEFT", parent, -sd.size - 1 - sd.offset, sd.size + 1 + sd.offset) - sd:SetPoint("BOTTOMRIGHT", parent, sd.size + 1 + sd.offset, -sd.size - 1 - sd.offset) - sd:SetBackdropBorderColor(r or 0, g or 0, b or 0) - sd:SetAlpha(alpha or 1) + sd:SetPoint("TOPLEFT", parent, -sd.size - 0 - sd.offset, sd.size + 0 + sd.offset) + sd:SetPoint("BOTTOMRIGHT", parent, sd.size + 0 + sd.offset, -sd.size - 0 - sd.offset) + sd:SetBackdropBorderColor(r or .03, g or .03, b or .03) + sd:SetAlpha(alpha or .6) end F.CreateFS = function(parent, fontSize, justify) @@ -140,7 +163,11 @@ F.SetFS = function(fontObject, fontSize) local size if(not fontSize or fontSize == C.FONT_SIZE_NORMAL) then - size = C.appearance.fontSizeNormal + if GetLocale() == "zhCN" then + size = 12 + else + size = C.appearance.fontSizeNormal + end elseif fontSize == C.FONT_SIZE_LARGE then size = C.appearance.fontSizeLarge elseif fontSize > 4 then -- actual size @@ -149,7 +176,11 @@ F.SetFS = function(fontObject, fontSize) local outline = nil if C.appearance.fontOutline then - outline = C.appearance.fontOutlineStyle == 2 and "OUTLINEMONOCHROME" or "OUTLINE" + if GetLocale() == "zhCN" then + outline = "OUTLINE" + else + outline = C.appearance.fontOutlineStyle == 2 and "OUTLINEMONOCHROME" or "OUTLINE" + end end fontObject:SetFont(mainFont, size, outline) @@ -184,13 +215,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 +230,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 +259,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 +303,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 +336,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 +399,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 +433,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) @@ -399,7 +456,7 @@ F.ReskinClose = function(f, a1, p, a2, x, y) f:ClearAllPoints() f:SetPoint(a1, p, a2, x, y) else - f:SetPoint("TOPRIGHT", -6, -6) + f:SetPoint("TOPRIGHT", -4, -4) end f:SetNormalTexture("") @@ -606,25 +663,29 @@ F.SetBD = function(f, x, y, x2, y2) end bg:SetFrameLevel(f:GetFrameLevel()-1) F.CreateBD(bg) + F.CreateSD(bg) 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 +696,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 +807,9 @@ F.ReskinIcon = function(icon) icon:SetTexCoord(.08, .92, .08, .92) return F.CreateBG(icon) end + + + +DEFAULT_CHAT_FRAME:AddMessage("FreeUI.Fluffy |cffffffff"..GetAddOnMetadata("FreeUI", "Version"), unpack(C.class)) +DEFAULT_CHAT_FRAME:AddMessage("|cfffffffftype|r /freeui |cffffffffto open options GUI|r", unpack(C.class)) +DEFAULT_CHAT_FRAME:AddMessage("|cffffffffFor more info visit|r https://github.com/solor/FreeUI.Fluffy|r", unpack(C.class)) diff --git a/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua b/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua index aab12c1d..7030d895 100644 --- a/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua +++ b/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua @@ -4,6 +4,7 @@ C.themes["Blizzard_AchievementUI"] = function() local r, g, b = C.r, C.g, C.b F.CreateBD(AchievementFrame) + F.CreateSD(AchievementFrame) AchievementFrameCategories:SetBackdrop(nil) AchievementFrameSummary:SetBackdrop(nil) for i = 1, 17 do @@ -15,6 +16,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 +59,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 +398,4 @@ C.themes["Blizzard_AchievementUI"] = function() F.ReskinScroll(AchievementFrameStatsContainerScrollBar) F.ReskinScroll(AchievementFrameCategoriesContainerScrollBar) F.ReskinScroll(AchievementFrameComparisonContainerScrollBar) - F.ReskinDropDown(AchievementFrameFilterDropDown) -end +end \ No newline at end of file diff --git a/FreeUI/theme/AddOns/Blizzard_InspectUI.lua b/FreeUI/theme/AddOns/Blizzard_InspectUI.lua index 7ad71634..23c2e77b 100644 --- a/FreeUI/theme/AddOns/Blizzard_InspectUI.lua +++ b/FreeUI/theme/AddOns/Blizzard_InspectUI.lua @@ -44,14 +44,21 @@ 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 local inspectSpec = InspectTalentFrame.InspectSpec @@ -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) @@ -171,4 +148,4 @@ C.themes["Blizzard_InspectUI"] = function() end F.ReskinPortraitFrame(InspectFrame, true) -end +end \ No newline at end of file diff --git a/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua b/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua index c31a057a..25b33ff1 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 \ No newline at end of file From ddada164531af2a91f31b472b73835af4ffc674c Mon Sep 17 00:00:00 2001 From: Christoffer Stokbaek Date: Tue, 26 Jul 2016 15:21:16 +0200 Subject: [PATCH 3/6] Fixed colouring of borders in bags --- FreeUI/scripts/bags.lua | 1 + 1 file changed, 1 insertion(+) 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 From e40555297646d8cd8c5571c2123371fdd0c500f3 Mon Sep 17 00:00:00 2001 From: Christoffer Stokbaek Date: Tue, 26 Jul 2016 15:21:59 +0200 Subject: [PATCH 4/6] fixed position of buffs --- FreeUI/scripts/buffs.lua | 1 + 1 file changed, 1 insertion(+) 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] From 1396e25affb4e9e2e3cb52ceb55726ef0df67f0c Mon Sep 17 00:00:00 2001 From: Christoffer Stokbaek Date: Tue, 26 Jul 2016 15:44:02 +0200 Subject: [PATCH 5/6] Skinning of QuestChoice + fix of api.lua coding --- FreeUI/core/api.lua | 202 +++++++------------ FreeUI/theme/AddOns/Blizzard_QuestChoice.lua | 29 ++- 2 files changed, 89 insertions(+), 142 deletions(-) diff --git a/FreeUI/core/api.lua b/FreeUI/core/api.lua index bd1aeff8..2d974f75 100644 --- a/FreeUI/core/api.lua +++ b/FreeUI/core/api.lua @@ -7,22 +7,22 @@ C.media = { ["arrowDown"] = "Interface\\AddOns\\FreeUI\\media\\arrow-down-active", ["arrowLeft"] = "Interface\\AddOns\\FreeUI\\media\\arrow-left-active", ["arrowRight"] = "Interface\\AddOns\\FreeUI\\media\\arrow-right-active", - ["backdrop"] = "Interface\\AddOns\\FreeUI\\media\\blank", -- default backdrop - ["checked"] = "Interface\\AddOns\\FreeUI\\media\\CheckButtonHilight", -- replace default checked texture - ["font"] = "Interface\\AddOns\\FreeUI\\media\\pixel.ttf", -- default pixel font - ["font2"] = "Fonts\\FRIZQT__.ttf", -- default font - ["glow"] = "Interface\\AddOns\\FreeUI\\media\\glowTex", -- glow/shadow texture + ["backdrop"] = "Interface\\ChatFrame\\ChatFrameBackground", -- default backdrop + ["checked"] = "Interface\\AddOns\\FreeUI\\media\\CheckButtonHilight", -- replace default checked texture + ["font"] = "Interface\\AddOns\\FreeUI\\media\\PFRondaSeven.ttf", -- default pixel font + ["font2"] = "Interface\\AddOns\\FreeUI\\media\\font.ttf", -- default font + ["glow"] = "Interface\\AddOns\\FreeUI\\media\\glowTex", -- glow/shadow texture ["gradient"] = "Interface\\AddOns\\FreeUI\\media\\gradient", ["roleIcons"] = "Interface\\Addons\\FreeUI\\media\\UI-LFG-ICON-ROLES", - ["texture"] = "Interface\\AddOns\\FreeUI\\media\\Texture1", -- statusbar texture + ["texture"] = "Interface\\AddOns\\FreeUI\\media\\statusbar", -- statusbar texture } local mainFont if C.appearance.fontUseAlternativeFont then mainFont = C.media.font2 -elseif GetLocale() == "zhCN" then - mainFont = "Fonts\\ARKai_T.TTF" +elseif GetLocale() == "ruRU" then + mainFont = "Interface\\AddOns\\FreeUI\\media\\iFlash705.ttf" else mainFont = C.media.font end @@ -30,39 +30,28 @@ end F.AddOptionsCallback("appearance", "fontUseAlternativeFont", function() if C.appearance.fontUseAlternativeFont then mainFont = C.media.font2 - elseif GetLocale() == "zhCN" then - mainFont = "Fonts\\ARKai_T.TTF" + elseif GetLocale() == "ruRU" then + mainFont = "Interface\\AddOns\\FreeUI\\media\\iFlash705.ttf" else mainFont = C.media.font end end) C.classcolours = { - ["DEATHKNIGHT"] = {r = 187/255, g = 0, b = 42/255}, + ["DEATHKNIGHT"] = {r = 0.77, g = 0.12, b = 0.23}, ["DEMONHUNTER"] = {r = 0.64, g = 0.19, b = 0.79}, - ["DRUID"] = {r = 0.94, g = 0.39, b = 0.1}, - ["HUNTER"] = {r = 126/255, g = 185/255, b = 18/255}, - ["MAGE"] = {r = 0.35, g = 0.76, b = 0.93}, - ["MONK"] = {r = 0.04, g = 0.85 , b = 0.53}, - ["PALADIN"] = {r = 241/255, g = 0, b = 168/255}, - ["PRIEST"] = {r = 219/255, g = 243/255, b = 1}, - ["ROGUE"] = {r = 1, g = 238/255, b = 0}, - ["SHAMAN"] = {r = 0.07, g = 0.42, b = 0.96}, - ["WARLOCK"] = {r = 136/255, g = 73/255, b = 223/255}, - ["WARRIOR"] = {r = 0.79, g = 0.61, b = 0.5}, + ["DRUID"] = {r = 1, g = 0.49, b = 0.04}, + ["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}, } -FACTION_BAR_COLORS = { - [1] = {r = 0.63, g = 0, b = 0}, - [2] = {r = 0.63, g = 0, b = 0}, - [3] = {r = 0.63, g = 0, b = 0}, - [4] = {r = 0.82, g = 0.67, b = 0}, - [5] = {r = 0.32, g = 0.67, b = 0}, - [6] = {r = 0.32, g = 0.67, b = 0}, - [7] = {r = 0.32, g = 0.67, b = 0}, - [8] = {r = 0, g = 0.75, b = 0.44}, -}; - local _, class = UnitClass("player") if C.appearance.colourScheme == 2 then C.class = {C.appearance.customColour.r, C.appearance.customColour.g, C.appearance.customColour.b} @@ -105,20 +94,8 @@ local CreateBD = function(f, a) edgeFile = C.media.backdrop, edgeSize = 1, }) - f:SetBackdropColor(.06, .06, .06, a or .9) + f:SetBackdropColor(0, 0, 0, a or .5) f:SetBackdropBorderColor(0, 0, 0) - - if not a then - f.tex = f.tex or f:CreateTexture(nil, "BACKGROUND", nil, 1) - f.tex:SetTexture([[Interface\AddOns\FreeUI\media\StripesThin]], true, true) - f.tex:SetAlpha(.5) - f.tex:SetAllPoints() - f.tex:SetHorizTile(true) - f.tex:SetVertTile(true) - f.tex:SetBlendMode("ADD") - else - f:SetBackdropColor(0, 0, 0, a) - end end F.CreateBD = CreateBD @@ -138,16 +115,16 @@ end F.CreateSD = function(parent, size, r, g, b, alpha, offset) local sd = CreateFrame("Frame", nil, parent) - sd.size = size or 4 - sd.offset = offset or -1 + sd.size = size or 5 + sd.offset = offset or 0 sd:SetBackdrop({ edgeFile = C.media.glow, edgeSize = sd.size, }) - sd:SetPoint("TOPLEFT", parent, -sd.size - 0 - sd.offset, sd.size + 0 + sd.offset) - sd:SetPoint("BOTTOMRIGHT", parent, sd.size + 0 + sd.offset, -sd.size - 0 - sd.offset) - sd:SetBackdropBorderColor(r or .03, g or .03, b or .03) - sd:SetAlpha(alpha or .6) + sd:SetPoint("TOPLEFT", parent, -sd.size - 1 - sd.offset, sd.size + 1 + sd.offset) + sd:SetPoint("BOTTOMRIGHT", parent, sd.size + 1 + sd.offset, -sd.size - 1 - sd.offset) + sd:SetBackdropBorderColor(r or 0, g or 0, b or 0) + sd:SetAlpha(alpha or 1) end F.CreateFS = function(parent, fontSize, justify) @@ -163,11 +140,7 @@ F.SetFS = function(fontObject, fontSize) local size if(not fontSize or fontSize == C.FONT_SIZE_NORMAL) then - if GetLocale() == "zhCN" then - size = 12 - else - size = C.appearance.fontSizeNormal - end + size = C.appearance.fontSizeNormal elseif fontSize == C.FONT_SIZE_LARGE then size = C.appearance.fontSizeLarge elseif fontSize > 4 then -- actual size @@ -176,11 +149,7 @@ F.SetFS = function(fontObject, fontSize) local outline = nil if C.appearance.fontOutline then - if GetLocale() == "zhCN" then - outline = "OUTLINE" - else - outline = C.appearance.fontOutlineStyle == 2 and "OUTLINEMONOCHROME" or "OUTLINE" - end + outline = C.appearance.fontOutlineStyle == 2 and "OUTLINEMONOCHROME" or "OUTLINE" end fontObject:SetFont(mainFont, size, outline) @@ -215,14 +184,13 @@ F.CreatePulse = function(frame) -- pulse function originally by nightcracker end local r, g, b = unpack(C.class) -local buttonR, buttonG, buttonB, buttonA = .06, .06, .06, .8 +local buttonR, buttonG, buttonB, buttonA = .3, .3, .3, .3 local CreateGradient = function(f) local tex = f:CreateTexture(nil, "BORDER") tex:SetPoint("TOPLEFT", 1, -1) tex:SetPoint("BOTTOMRIGHT", -1, 1) - tex:SetTexture(C.media.backdrop) --- tex:SetGradientAlpha("VERTICAL", 0, 0, 0, .3, .35, .35, .35, .35) + tex:SetTexture(C.media.gradient) tex:SetVertexColor(buttonR, buttonG, buttonB, buttonA) return tex @@ -230,22 +198,19 @@ end F.CreateGradient = CreateGradient -local function StartGlow(f) +local function colourButton(f) if not f:IsEnabled() then return end - f:SetBackdropColor(r, g, b, .1) + + f:SetBackdropColor(r, g, b, buttonA) f:SetBackdropBorderColor(r, g, b) - f.glow:SetAlpha(1) - F.CreatePulse(f.glow) end -local function StopGlow(f) +local function clearButton(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, noGlow) +F.Reskin = function(f, noHighlight) f:SetNormalTexture("") f:SetHighlightTexture("") f:SetPushedTexture("") @@ -259,21 +224,11 @@ F.Reskin = function(f, noGlow) F.CreateBD(f, 0) - CreateGradient(f) + f.tex = CreateGradient(f) - 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) + if not noHighlight then + f:HookScript("OnEnter", colourButton) + f:HookScript("OnLeave", clearButton) end end @@ -303,27 +258,16 @@ local function clearScroll(f) f.tex:SetVertexColor(1, 1, 1) end -F.ReskinScroll = function(f, parent) +F.ReskinScroll = function(f) local frame = f:GetName() - 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 + 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 - local bu = f.ThumbTexture or f.thumbTexture or _G[frame.."ThumbTexture"] + local bu = _G[frame.."ThumbTexture"] bu:SetAlpha(0) bu:SetWidth(17) @@ -336,8 +280,8 @@ F.ReskinScroll = function(f, parent) tex:SetPoint("TOPLEFT", bu.bg, 1, -1) tex:SetPoint("BOTTOMRIGHT", bu.bg, -1, 1) - 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"] + local up = _G[frame.."ScrollUpButton"] + local down = _G[frame.."ScrollDownButton"] up:SetWidth(17) down:SetWidth(17) @@ -400,15 +344,15 @@ F.ReskinDropDown = function(f) if right then right:SetAlpha(0) end 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) - + 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) @@ -456,7 +400,7 @@ F.ReskinClose = function(f, a1, p, a2, x, y) f:ClearAllPoints() f:SetPoint(a1, p, a2, x, y) else - f:SetPoint("TOPRIGHT", -4, -4) + f:SetPoint("TOPRIGHT", -6, -6) end f:SetNormalTexture("") @@ -663,29 +607,25 @@ F.SetBD = function(f, x, y, x2, y2) end bg:SetFrameLevel(f:GetFrameLevel()-1) F.CreateBD(bg) - F.CreateSD(bg) end F.ReskinPortraitFrame = function(f, isButtonFrame) local name = f:GetName() - f.Bg:Hide() + _G[name.."Bg"]:Hide() _G[name.."TitleBg"]:Hide() - f.portrait:Hide() - f.portraitFrame:Hide() + _G[name.."Portrait"]:Hide() + _G[name.."PortraitFrame"]:Hide() _G[name.."TopRightCorner"]:Hide() - f.topLeftCorner:Hide() - f.topBorderBar:Hide() - f.TopTileStreaks:SetTexture("") + _G[name.."TopLeftCorner"]:Hide() + _G[name.."TopBorder"]:Hide() + _G[name.."TopTileStreaks"]:SetTexture("") _G[name.."BotLeftCorner"]:Hide() _G[name.."BotRightCorner"]:Hide() _G[name.."BottomBorder"]:Hide() - f.leftBorderBar:Hide() + _G[name.."LeftBorder"]: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("") @@ -696,7 +636,7 @@ F.ReskinPortraitFrame = function(f, isButtonFrame) end F.CreateBD(f) - F.CreateSD(f) + F.ReskinClose(_G[name.."CloseButton"]) end F.CreateBDFrame = function(f, a) @@ -807,9 +747,3 @@ F.ReskinIcon = function(icon) icon:SetTexCoord(.08, .92, .08, .92) return F.CreateBG(icon) end - - - -DEFAULT_CHAT_FRAME:AddMessage("FreeUI.Fluffy |cffffffff"..GetAddOnMetadata("FreeUI", "Version"), unpack(C.class)) -DEFAULT_CHAT_FRAME:AddMessage("|cfffffffftype|r /freeui |cffffffffto open options GUI|r", unpack(C.class)) -DEFAULT_CHAT_FRAME:AddMessage("|cffffffffFor more info visit|r https://github.com/solor/FreeUI.Fluffy|r", unpack(C.class)) diff --git a/FreeUI/theme/AddOns/Blizzard_QuestChoice.lua b/FreeUI/theme/AddOns/Blizzard_QuestChoice.lua index cd222b81..cb48ecdb 100644 --- a/FreeUI/theme/AddOns/Blizzard_QuestChoice.lua +++ b/FreeUI/theme/AddOns/Blizzard_QuestChoice.lua @@ -11,18 +11,24 @@ C.themes["Blizzard_QuestChoice"] = function() select(i, QuestChoiceFrame:GetRegions()):Hide() end - for i = 1, 2 do + local numOptions = #QuestChoiceFrame.Options or 2 + for i = 1, numOptions do local option = QuestChoiceFrame["Option"..i] local rewards = option.Rewards - local icon = rewards.Item.Icon + local item = rewards.Item local currencies = rewards.Currencies + option.Header.Background:Hide() + option.Header.Text:SetTextColor(.9, .9, .9) + + option.Artwork:SetTexCoord(0.140625, 0.84375, 0.2265625, 0.78125) + option.Artwork:SetSize(180, 71) + option.Artwork:SetPoint("TOP", 0, -20) option.OptionText:SetTextColor(.9, .9, .9) - rewards.Item.Name:SetTextColor(1, 1, 1) - icon:SetTexCoord(.08, .92, .08, .92) - icon:SetDrawLayer("BACKGROUND", 1) - F.CreateBG(icon) + item.Name:SetTextColor(1, 1, 1) + item.Icon:SetTexCoord(.08, .92, .08, .92) + item.bg = F.CreateBG(item.Icon) for j = 1, 3 do local cu = currencies["Currency"..j] @@ -30,10 +36,17 @@ C.themes["Blizzard_QuestChoice"] = function() cu.Icon:SetTexCoord(.08, .92, .08, .92) F.CreateBG(cu.Icon) end + F.Reskin(option.OptionButton) end + hooksecurefunc("QuestChoiceFrame_ShowRewards", function(numOptions) + for i = 1, numOptions do + local rewards = QuestChoiceFrame["Option"..i].Rewards + rewards.Item.bg:SetVertexColor(rewards.Item.IconBorder:GetVertexColor()) + rewards.Item.IconBorder:Hide() + end + end) + F.CreateBD(QuestChoiceFrame) - F.Reskin(QuestChoiceFrame.Option1.OptionButton) - F.Reskin(QuestChoiceFrame.Option2.OptionButton) F.ReskinClose(QuestChoiceFrame.CloseButton) end \ No newline at end of file From 0d7b11ce3bb500cb5e6dfc97ae266f6c42c1e11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20Stokb=C3=A6k?= Date: Tue, 26 Jul 2016 22:43:40 +0200 Subject: [PATCH 6/6] UI skinning was done wrong. This is fixed and tested ingame --- FreeUI/core/api.lua | 103 +++++++++++------- .../theme/AddOns/Blizzard_AchievementUI.lua | 3 +- .../AddOns/Blizzard_EncounterJournal.lua | 73 ++++++++++--- FreeUI/theme/AddOns/Blizzard_InspectUI.lua | 4 +- FreeUI/theme/AddOns/Blizzard_QuestChoice.lua | 29 ++--- FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua | 2 +- 6 files changed, 134 insertions(+), 80 deletions(-) diff --git a/FreeUI/core/api.lua b/FreeUI/core/api.lua index 2d974f75..4b348182 100644 --- a/FreeUI/core/api.lua +++ b/FreeUI/core/api.lua @@ -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) @@ -344,15 +369,15 @@ F.ReskinDropDown = function(f) if right then right:SetAlpha(0) end 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) - + 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) @@ -612,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("") @@ -636,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) @@ -747,3 +775,4 @@ F.ReskinIcon = function(icon) icon:SetTexCoord(.08, .92, .08, .92) return F.CreateBG(icon) end + diff --git a/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua b/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua index 7030d895..04456dcd 100644 --- a/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua +++ b/FreeUI/theme/AddOns/Blizzard_AchievementUI.lua @@ -4,7 +4,6 @@ C.themes["Blizzard_AchievementUI"] = function() local r, g, b = C.r, C.g, C.b F.CreateBD(AchievementFrame) - F.CreateSD(AchievementFrame) AchievementFrameCategories:SetBackdrop(nil) AchievementFrameSummary:SetBackdrop(nil) for i = 1, 17 do @@ -398,4 +397,4 @@ C.themes["Blizzard_AchievementUI"] = function() F.ReskinScroll(AchievementFrameStatsContainerScrollBar) F.ReskinScroll(AchievementFrameCategoriesContainerScrollBar) F.ReskinScroll(AchievementFrameComparisonContainerScrollBar) -end \ No newline at end of file +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 23c2e77b..43bb35ef 100644 --- a/FreeUI/theme/AddOns/Blizzard_InspectUI.lua +++ b/FreeUI/theme/AddOns/Blizzard_InspectUI.lua @@ -58,7 +58,7 @@ C.themes["Blizzard_InspectUI"] = function() F.CreateBG(bu.Icon) end end - + -- Talents local inspectSpec = InspectTalentFrame.InspectSpec @@ -148,4 +148,4 @@ C.themes["Blizzard_InspectUI"] = function() end F.ReskinPortraitFrame(InspectFrame, true) -end \ No newline at end of file +end diff --git a/FreeUI/theme/AddOns/Blizzard_QuestChoice.lua b/FreeUI/theme/AddOns/Blizzard_QuestChoice.lua index cb48ecdb..cd222b81 100644 --- a/FreeUI/theme/AddOns/Blizzard_QuestChoice.lua +++ b/FreeUI/theme/AddOns/Blizzard_QuestChoice.lua @@ -11,24 +11,18 @@ C.themes["Blizzard_QuestChoice"] = function() select(i, QuestChoiceFrame:GetRegions()):Hide() end - local numOptions = #QuestChoiceFrame.Options or 2 - for i = 1, numOptions do + for i = 1, 2 do local option = QuestChoiceFrame["Option"..i] local rewards = option.Rewards - local item = rewards.Item + local icon = rewards.Item.Icon local currencies = rewards.Currencies - option.Header.Background:Hide() - option.Header.Text:SetTextColor(.9, .9, .9) - - option.Artwork:SetTexCoord(0.140625, 0.84375, 0.2265625, 0.78125) - option.Artwork:SetSize(180, 71) - option.Artwork:SetPoint("TOP", 0, -20) option.OptionText:SetTextColor(.9, .9, .9) + rewards.Item.Name:SetTextColor(1, 1, 1) - item.Name:SetTextColor(1, 1, 1) - item.Icon:SetTexCoord(.08, .92, .08, .92) - item.bg = F.CreateBG(item.Icon) + icon:SetTexCoord(.08, .92, .08, .92) + icon:SetDrawLayer("BACKGROUND", 1) + F.CreateBG(icon) for j = 1, 3 do local cu = currencies["Currency"..j] @@ -36,17 +30,10 @@ C.themes["Blizzard_QuestChoice"] = function() cu.Icon:SetTexCoord(.08, .92, .08, .92) F.CreateBG(cu.Icon) end - F.Reskin(option.OptionButton) end - hooksecurefunc("QuestChoiceFrame_ShowRewards", function(numOptions) - for i = 1, numOptions do - local rewards = QuestChoiceFrame["Option"..i].Rewards - rewards.Item.bg:SetVertexColor(rewards.Item.IconBorder:GetVertexColor()) - rewards.Item.IconBorder:Hide() - end - end) - F.CreateBD(QuestChoiceFrame) + F.Reskin(QuestChoiceFrame.Option1.OptionButton) + F.Reskin(QuestChoiceFrame.Option2.OptionButton) F.ReskinClose(QuestChoiceFrame.CloseButton) end \ No newline at end of file diff --git a/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua b/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua index 25b33ff1..50bb9ccf 100644 --- a/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua +++ b/FreeUI/theme/AddOns/Blizzard_TradeSkillUI.lua @@ -108,4 +108,4 @@ C.themes["Blizzard_TradeSkillUI"] = function() bg:SetPoint("BOTTOMRIGHT", -4, 0) end -end \ No newline at end of file +end