mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-20 11:30:48 +00:00
skin: adjust trade item buttons and highlight
This commit is contained in:
@@ -20,25 +20,29 @@ pfUI:RegisterSkin("Trade", function ()
|
|||||||
|
|
||||||
for i = 1, MAX_TRADE_ITEMS do
|
for i = 1, MAX_TRADE_ITEMS do
|
||||||
local PlayerButton = _G["TradePlayerItem"..i]
|
local PlayerButton = _G["TradePlayerItem"..i]
|
||||||
StripTextures(PlayerButton)
|
|
||||||
CreateBackdrop(PlayerButton, nil, nil, .75)
|
|
||||||
local PlayerItemButton = _G["TradePlayerItem"..i.."ItemButton"]
|
local PlayerItemButton = _G["TradePlayerItem"..i.."ItemButton"]
|
||||||
|
local RecipientButton = _G["TradeRecipientItem"..i]
|
||||||
|
local RecipientItemButton = _G["TradeRecipientItem"..i.."ItemButton"]
|
||||||
|
|
||||||
|
StripTextures(PlayerButton)
|
||||||
StripTextures(PlayerItemButton)
|
StripTextures(PlayerItemButton)
|
||||||
SkinButton(PlayerItemButton, nil, nil, nil, _G[PlayerItemButton:GetName()..'IconTexture'])
|
SkinButton(PlayerItemButton, nil, nil, nil, _G[PlayerItemButton:GetName()..'IconTexture'])
|
||||||
|
local PlayerItemButtonBG = PlayerButton:CreateTexture(nil, "LOW")
|
||||||
|
PlayerItemButtonBG:SetTexture(1,1,1,.05)
|
||||||
|
PlayerItemButtonBG:SetAllPoints()
|
||||||
|
|
||||||
local RecipientButton = _G["TradeRecipientItem"..i]
|
|
||||||
StripTextures(RecipientButton)
|
StripTextures(RecipientButton)
|
||||||
CreateBackdrop(RecipientButton, nil, nil, .75)
|
|
||||||
local RecipientItemButton = _G["TradeRecipientItem"..i.."ItemButton"]
|
|
||||||
StripTextures(RecipientItemButton)
|
StripTextures(RecipientItemButton)
|
||||||
SkinButton(RecipientItemButton)
|
SkinButton(RecipientItemButton, nil, nil, nil, _G[RecipientItemButton:GetName()..'IconTexture'])
|
||||||
|
local RecipientButtonBG = RecipientButton:CreateTexture(nil, "LOW")
|
||||||
|
RecipientButtonBG:SetTexture(1,1,1,.05)
|
||||||
|
RecipientButtonBG:SetAllPoints()
|
||||||
end
|
end
|
||||||
|
|
||||||
hooksecurefunc("TradeFrame_UpdateTargetItem", function(id)
|
hooksecurefunc("TradeFrame_UpdateTargetItem", function(id)
|
||||||
HandleIcon(_G["TradeRecipientItem"..id.."ItemButton"], _G["TradeRecipientItem"..id..'IconTexture'])
|
HandleIcon(_G["TradeRecipientItem"..id.."ItemButton"], _G["TradeRecipientItem"..id..'IconTexture'])
|
||||||
end, 1)
|
end, 1)
|
||||||
|
|
||||||
|
|
||||||
SkinMoneyInputFrame(TradePlayerInputMoneyFrame)
|
SkinMoneyInputFrame(TradePlayerInputMoneyFrame)
|
||||||
|
|
||||||
SkinButton(TradeFrameCancelButton)
|
SkinButton(TradeFrameCancelButton)
|
||||||
@@ -47,4 +51,25 @@ pfUI:RegisterSkin("Trade", function ()
|
|||||||
SkinButton(TradeFrameTradeButton)
|
SkinButton(TradeFrameTradeButton)
|
||||||
TradeFrameTradeButton:ClearAllPoints()
|
TradeFrameTradeButton:ClearAllPoints()
|
||||||
TradeFrameTradeButton:SetPoint("RIGHT", TradeFrameCancelButton, "LEFT", -2*bpad, 0)
|
TradeFrameTradeButton:SetPoint("RIGHT", TradeFrameCancelButton, "LEFT", -2*bpad, 0)
|
||||||
|
|
||||||
|
-- skin highlights
|
||||||
|
TradeHighlightPlayerTop:SetTexture(0, 0, 0, 0)
|
||||||
|
TradeHighlightPlayerMiddle:SetTexture(0, 0, 0, 0)
|
||||||
|
TradeHighlightPlayerBottom:SetTexture(0, 1, 0, 0.2)
|
||||||
|
TradeHighlightPlayerBottom:SetPoint("TOPLEFT", 2, 0)
|
||||||
|
|
||||||
|
TradeHighlightPlayerEnchantTop:SetTexture(0, 0, 0, 0)
|
||||||
|
TradeHighlightPlayerEnchantMiddle:SetTexture(0, 0, 0, 0)
|
||||||
|
TradeHighlightPlayerEnchantBottom:SetTexture(0, 1, 0, 0.2)
|
||||||
|
TradeHighlightPlayerEnchantBottom:SetPoint("TOPLEFT", 2, 0)
|
||||||
|
|
||||||
|
TradeHighlightRecipientTop:SetTexture(0, 0, 0, 0)
|
||||||
|
TradeHighlightRecipientMiddle:SetTexture(0, 0, 0, 0)
|
||||||
|
TradeHighlightRecipientBottom:SetTexture(0, 1, 0, 0.2)
|
||||||
|
TradeHighlightRecipientBottom:SetPoint("TOPLEFT", 2, 0)
|
||||||
|
|
||||||
|
TradeHighlightRecipientEnchantTop:SetTexture(0, 0, 0, 0)
|
||||||
|
TradeHighlightRecipientEnchantMiddle:SetTexture(0, 0, 0, 0)
|
||||||
|
TradeHighlightRecipientEnchantBottom:SetTexture(0, 1, 0, 0.2)
|
||||||
|
TradeHighlightRecipientEnchantBottom:SetPoint("TOPLEFT", 2, 0)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user