You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.0 KiB

4 years ago
local E, L, V, P, G = unpack(ElvUI)
5 years ago
local S = E:GetModule('Skins')
local _G = _G
5 months ago
local unpack = unpack
5 years ago
local hooksecurefunc = hooksecurefunc
5 months ago
local function ButtonHeader_Update(header)
local r, g, b = unpack(E.media.rgbvaluecolor)
header.HighlightTexture:SetColorTexture(r, g, b, 0.25)
header.HighlightTexture:SetInside()
header.NormalTexture:SetTexture()
header:SetTemplate('Transparent')
end
5 years ago
function S:Blizzard_Channels()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.channels) then return end
5 months ago
local channelFrame = _G.ChannelFrame
if channelFrame then
S:HandlePortraitFrame(channelFrame)
S:HandleButton(channelFrame.SettingsButton) -- using -4, 4
S:HandleTrimScrollBar(channelFrame.ChannelRoster.ScrollBar)
S:HandleButton(channelFrame.NewButton)
channelFrame.NewButton:ClearAllPoints()
channelFrame.NewButton:Point('BOTTOMLEFT', channelFrame, 4, 4) -- make it match settings button
local channelList = channelFrame.ChannelList
if channelList then
S:HandleTrimScrollBar(channelList.ScrollBar)
channelList.ScrollBar:Point('BOTTOMLEFT', channelList, 'BOTTOMRIGHT', 0, 15)
end
end
local createChannelPopup = _G.CreateChannelPopup
if createChannelPopup then
createChannelPopup:StripTextures()
createChannelPopup:SetTemplate('Transparent')
createChannelPopup.Header:StripTextures()
S:HandleCloseButton(createChannelPopup.CloseButton)
S:HandleButton(createChannelPopup.OKButton)
S:HandleButton(createChannelPopup.CancelButton)
S:HandleEditBox(createChannelPopup.Name)
S:HandleEditBox(createChannelPopup.Password)
end
local voiceChatPrompt = _G.VoiceChatPromptActivateChannel
if voiceChatPrompt then
voiceChatPrompt:StripTextures()
voiceChatPrompt:SetTemplate('Transparent')
S:HandleButton(voiceChatPrompt.AcceptButton)
S:HandleCloseButton(voiceChatPrompt.CloseButton)
end
5 years ago
-- Hide the Channel Header Textures
5 months ago
hooksecurefunc(_G.ChannelButtonHeaderMixin, 'Update', ButtonHeader_Update)
5 years ago
end
S:AddCallbackForAddon('Blizzard_Channels')