From 8bc3744021742c088ed2d4e76c4902c4957b5511 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 26 Sep 2019 19:37:36 +0200 Subject: [PATCH] skins: show material backgrounds on quest frame --- skins/blizzard/gossipquest.lua | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/skins/blizzard/gossipquest.lua b/skins/blizzard/gossipquest.lua index cc133be2..183347d7 100644 --- a/skins/blizzard/gossipquest.lua +++ b/skins/blizzard/gossipquest.lua @@ -92,7 +92,8 @@ pfUI:RegisterSkin("Gossip and Quest", "vanilla:tbc", function () local panel = v if frameName == 'Gossip' and panel ~= 'Greeting' then break end - StripTextures(_G[frame:GetName()..panel.."Panel"]) + local fname = frame:GetName()..panel.."Panel" + StripTextures(_G[fname]) local scroll = _G[frameName..panel.."ScrollFrame"] scroll:SetHeight(330) @@ -104,6 +105,25 @@ pfUI:RegisterSkin("Gossip and Quest", "vanilla:tbc", function () bg:SetTexCoord(.1,1,0,1) bg:SetTexture("Interface\\Stationery\\StationeryTest1") + -- assign material backgrounds to the default one + _G[fname.."MaterialTopLeft"].SetTexture = function(self, texture) + bg:SetTexture(texture) + end + + _G[fname.."MaterialTopLeft"].Hide = function() + bg:SetTexture("Interface\\Stationery\\StationeryTest1") + end + + -- disable meterial backgrounds + _G[fname.."MaterialTopLeft"].Show = function() return end + _G[fname.."MaterialTopRight"].Show = function() return end + _G[fname.."MaterialBotLeft"].Show = function() return end + _G[fname.."MaterialBotRight"].Show = function() return end + _G[fname.."MaterialTopLeft"]:Hide() + _G[fname.."MaterialTopRight"]:Hide() + _G[fname.."MaterialBotLeft"]:Hide() + _G[fname.."MaterialBotRight"]:Hide() + if panel ~= 'Greeting' then local num_items, hook_func if panel == 'Progress' then