Commit 4a3729ae authored by Merathilis's avatar Merathilis

Fixed errors in FriendsFrame skin.

parent a221df5d
......@@ -5,8 +5,11 @@ local S = E:GetModule("Skins")
-- Lua functions
local _G = _G
-- WoW API
local AnimateTexCoords = AnimateTexCoords
local CreateFrame = CreateFrame
-- GLOBALS: GUILD, PanelTemplates_DeselectTab
local PanelTemplates_DeselectTab = PanelTemplates_DeselectTab
local hooksecurefunc = hooksecurefunc
-- GLOBALS:
local function styleFriends()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.friends ~= true or E.private.muiSkins.blizzard.friends ~= true then return end
......@@ -14,38 +17,26 @@ local function styleFriends()
local FriendsFrame = _G.FriendsFrame
FriendsFrame:Styling()
_G.RecruitAFriendFrame:Styling()
_G.RecruitAFriendSentFrame:Styling()
_G.RecruitAFriendSentFrame.MoreDetails.Text:FontTemplate()
-- Animated Icon
FriendsFrameIcon:SetPoint("TOPLEFT", FriendsFrame, "TOPLEFT", 0, 0)
FriendsFrameIcon:SetTexture([[Interface\AddOns\ElvUI_MerathilisUI\media\textures\Bnet]])
FriendsFrameIcon:SetSize(36, 36)
_G.FriendsFrameIcon:SetPoint("TOPLEFT", FriendsFrame, "TOPLEFT", 0, 0)
_G.FriendsFrameIcon:SetTexture([[Interface\AddOns\ElvUI_MerathilisUI\media\textures\Bnet]])
_G.FriendsFrameIcon:SetSize(36, 36)
hooksecurefunc(FriendsFrameIcon, "SetTexture", function(self, texture)
hooksecurefunc(_G.FriendsFrameIcon, "SetTexture", function(self, texture)
if texture ~= [[Interface\AddOns\ElvUI_MerathilisUI\media\textures\Bnet]] then
self:SetTexture([[Interface\AddOns\ElvUI_MerathilisUI\media\textures\Bnet]])
end
end)
FriendsListFrame:HookScript("OnShow", function()
FriendsFrameIcon:SetAlpha(1)
_G.FriendsListFrame:HookScript("OnShow", function()
_G.FriendsFrameIcon:SetAlpha(1)
end)
FriendsListFrame:HookScript("OnHide", function()
FriendsFrameIcon:SetAlpha(0)
_G.FriendsListFrame:HookScript("OnHide", function()
_G.FriendsFrameIcon:SetAlpha(0)
end)
FriendsFrame:HookScript("OnUpdate", function(self, elapsed)
AnimateTexCoords(FriendsFrameIcon, 512, 256, 64, 64, 25, elapsed, 0.01)
AnimateTexCoords(_G.FriendsFrameIcon, 512, 256, 64, 64, 25, elapsed, 0.01)
end)
-- GuildTab in FriendsFrame
local n = FriendsFrame.numTabs + 1
local gtframe = CreateFrame("Button", "FriendsFrameTab"..n, FriendsFrame, "FriendsFrameTabTemplate")
gtframe:SetText(GUILD)
gtframe:SetPoint("LEFT", _G["FriendsFrameTab"..n - 1], "RIGHT", -15, 0)
PanelTemplates_DeselectTab(gtframe)
gtframe:SetScript("OnClick", function() _G.ToggleGuildFrame() end)
S:HandleTab(_G["FriendsFrameTab4"])
end
S:AddCallback("mUIFriends", styleFriends)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment