mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
update Mail skin (not finished)
@Loaal I need some help with this one if you don't mind.
This commit is contained in:
@@ -47,22 +47,18 @@ local function LoadSkin()
|
|||||||
|
|
||||||
for i = 1, INBOXITEMS_TO_DISPLAY do
|
for i = 1, INBOXITEMS_TO_DISPLAY do
|
||||||
if index <= numItems then
|
if index <= numItems then
|
||||||
local packageIcon, _, _, _, _, _, _, _, _, _, _, _, isGM = GetInboxHeaderInfo(index)
|
local packageIcon = select(1, GetInboxHeaderInfo(index))
|
||||||
|
local isGM = select(13, GetInboxHeaderInfo(index))
|
||||||
local button = _G["MailItem"..i.."Button"]
|
local button = _G["MailItem"..i.."Button"]
|
||||||
|
|
||||||
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
if packageIcon and not isGM then
|
if packageIcon and not isGM then
|
||||||
local ItemLink = GetInboxItemLink(index, 1)
|
local quality = select(4, GetInboxItem(index))
|
||||||
|
if quality then
|
||||||
if ItemLink then
|
|
||||||
local quality = select(3, GetItemInfo(ItemLink))
|
|
||||||
|
|
||||||
if quality and quality > 1 then
|
|
||||||
button:SetBackdropBorderColor(GetItemQualityColor(quality))
|
button:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
else
|
else
|
||||||
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end
|
end
|
||||||
end
|
|
||||||
elseif isGM then
|
elseif isGM then
|
||||||
button:SetBackdropBorderColor(0, 0.56, 0.94)
|
button:SetBackdropBorderColor(0, 0.56, 0.94)
|
||||||
end
|
end
|
||||||
@@ -90,36 +86,32 @@ local function LoadSkin()
|
|||||||
E:StripTextures(SendMailScrollFrame, true)
|
E:StripTextures(SendMailScrollFrame, true)
|
||||||
E:SetTemplate(SendMailScrollFrame, "Default")
|
E:SetTemplate(SendMailScrollFrame, "Default")
|
||||||
|
|
||||||
-- hooksecurefunc("SendMailFrame_Update", function()
|
hooksecurefunc("SendMailFrame_Update", function()
|
||||||
-- for i = 1, ATTACHMENTS_MAX_SEND do
|
if not SendMailPackageButton.skinned then
|
||||||
-- local button = _G["SendMailAttachment"..i]
|
E:StripTextures(SendMailPackageButton)
|
||||||
-- local texture = button:GetNormalTexture()
|
E:SetTemplate(SendMailPackageButton, "Default", true)
|
||||||
-- local itemName = GetSendMailItem(i)
|
E:StyleButton(SendMailPackageButton, nil, true)
|
||||||
|
|
||||||
-- if not button.skinned then
|
SendMailPackageButton.skinned = true
|
||||||
-- E:StripTextures(button)
|
end
|
||||||
-- E:SetTemplate(button, "Default", true)
|
|
||||||
-- E:StyleButton(button, nil, true)
|
|
||||||
|
|
||||||
-- button.skinned = true
|
local itemName = select(1, GetSendMailItem())
|
||||||
-- end
|
|
||||||
|
|
||||||
-- if itemName then
|
if itemName then
|
||||||
-- local quality = select(3, GetItemInfo(itemName))
|
local quality = select(4, GetSendMailItem())
|
||||||
|
|
||||||
-- if quality and quality > 1 then
|
if quality and quality > 1 then
|
||||||
-- button:SetBackdropBorderColor(GetItemQualityColor(quality))
|
SendMailPackageButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
-- else
|
else
|
||||||
-- button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
SendMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
-- end
|
end
|
||||||
|
|
||||||
-- texture:SetTexCoord(unpack(E.TexCoords))
|
SendMailPackageButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
-- E:SetInside(texture)
|
E:SetInside(SendMailPackageButton:GetNormalTexture())
|
||||||
-- else
|
else
|
||||||
-- button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
SendMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
-- end
|
end
|
||||||
-- end
|
end)
|
||||||
-- end)
|
|
||||||
|
|
||||||
SendMailBodyEditBox:SetTextColor(1, 1, 1)
|
SendMailBodyEditBox:SetTextColor(1, 1, 1)
|
||||||
|
|
||||||
@@ -150,39 +142,29 @@ local function LoadSkin()
|
|||||||
OpenMailFrame.backdrop:SetPoint("TOPLEFT", 12, -12)
|
OpenMailFrame.backdrop:SetPoint("TOPLEFT", 12, -12)
|
||||||
OpenMailFrame.backdrop:SetPoint("BOTTOMRIGHT", -34, 74)
|
OpenMailFrame.backdrop:SetPoint("BOTTOMRIGHT", -34, 74)
|
||||||
|
|
||||||
-- for i = 1, 12 do
|
|
||||||
-- local button = _G["OpenMailAttachmentButton"..i]
|
|
||||||
-- local icon = _G["OpenMailAttachmentButton"..i.."IconTexture"]
|
|
||||||
-- local count = _G["OpenMailAttachmentButton"..i.."Count"]
|
|
||||||
|
|
||||||
-- E:StripTextures(button)
|
|
||||||
-- E:SetTemplate(button, "Default", true)
|
|
||||||
-- E:StyleButton(button)
|
|
||||||
|
|
||||||
-- if icon then
|
-- hooksecurefunc("OpenMail_Update", function()
|
||||||
-- icon:SetTexCoord(unpack(E.TexCoords))
|
-- local numItems = GetInboxNumItems()
|
||||||
-- icon:SetDrawLayer("ARTWORK")
|
-- local index = ((InboxFrame.pageNum - 1) * INBOXITEMS_TO_DISPLAY) + 1
|
||||||
-- E:SetInside(icon)
|
|
||||||
|
|
||||||
-- count:SetDrawLayer("OVERLAY")
|
-- E:SetTemplate(OpenMailPackageButton, "Default", true)
|
||||||
-- end
|
-- E:StyleButton(OpenMailPackageButton, nil, true)
|
||||||
-- end
|
-- OpenMailPackageButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
|
-- E:SetInside(OpenMailPackageButton:GetNormalTexture())
|
||||||
|
|
||||||
-- hooksecurefunc("OpenMailFrame_UpdateButtonPositions", function()
|
-- local itemName = select(1, GetInboxItem(index))
|
||||||
-- for i = 1, ATTACHMENTS_MAX_RECEIVE do
|
-- if itemName then
|
||||||
-- local ItemLink = GetInboxItemLink(InboxFrame.openMailID, i)
|
-- local quality = select(4, GetInboxItem(index))
|
||||||
-- local button = _G["OpenMailAttachmentButton"..i]
|
|
||||||
|
|
||||||
-- button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
|
||||||
-- if ItemLink then
|
|
||||||
-- local quality = select(3, GetItemInfo(ItemLink))
|
|
||||||
|
|
||||||
-- if quality and quality > 1 then
|
-- if quality and quality > 1 then
|
||||||
-- button:SetBackdropBorderColor(GetItemQualityColor(quality))
|
-- OpenMailPackageButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
-- else
|
-- else
|
||||||
-- button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
-- OpenMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
-- end
|
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
-- else
|
||||||
|
-- OpenMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
-- end
|
-- end
|
||||||
-- end)
|
-- end)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user