mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +00:00
skins: handle material background on itemtexts
This commit is contained in:
@@ -24,11 +24,31 @@ pfUI:RegisterSkin("Books", "vanilla:tbc", function ()
|
|||||||
ItemTextScrollFrame:ClearAllPoints()
|
ItemTextScrollFrame:ClearAllPoints()
|
||||||
ItemTextScrollFrame:SetPoint("TOPRIGHT", -66, -46)
|
ItemTextScrollFrame:SetPoint("TOPRIGHT", -66, -46)
|
||||||
|
|
||||||
local bg = ItemTextScrollFrame:CreateTexture(nil, "LOW")
|
-- add new background
|
||||||
|
local bg = ItemTextScrollFrame:CreateTexture(nil, "BORDER")
|
||||||
bg:SetAllPoints()
|
bg:SetAllPoints()
|
||||||
bg:SetTexCoord(.1,1,0,1)
|
bg:SetTexCoord(.1,1,0,1)
|
||||||
bg:SetTexture("Interface\\Stationery\\StationeryTest1")
|
bg:SetTexture("Interface\\Stationery\\StationeryTest1")
|
||||||
|
|
||||||
|
-- assign material backgrounds to the default one
|
||||||
|
ItemTextMaterialTopLeft.SetTexture = function(self, texture)
|
||||||
|
bg:SetTexture(texture)
|
||||||
|
end
|
||||||
|
|
||||||
|
ItemTextMaterialTopLeft.Hide = function()
|
||||||
|
bg:SetTexture("Interface\\Stationery\\StationeryTest1")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- disable meterial backgrounds
|
||||||
|
ItemTextMaterialTopLeft.Show = function() return end
|
||||||
|
ItemTextMaterialTopRight.Show = function() return end
|
||||||
|
ItemTextMaterialBotLeft.Show = function() return end
|
||||||
|
ItemTextMaterialBotRight.Show = function() return end
|
||||||
|
ItemTextMaterialTopLeft:Hide()
|
||||||
|
ItemTextMaterialTopRight:Hide()
|
||||||
|
ItemTextMaterialBotLeft:Hide()
|
||||||
|
ItemTextMaterialBotRight:Hide()
|
||||||
|
|
||||||
ItemTextCurrentPage:ClearAllPoints()
|
ItemTextCurrentPage:ClearAllPoints()
|
||||||
ItemTextCurrentPage:SetPoint("TOP", ItemTextScrollFrame, "BOTTOM", 0, -10)
|
ItemTextCurrentPage:SetPoint("TOP", ItemTextScrollFrame, "BOTTOM", 0, -10)
|
||||||
local orig_SetText = ItemTextCurrentPage.SetText
|
local orig_SetText = ItemTextCurrentPage.SetText
|
||||||
|
|||||||
Reference in New Issue
Block a user