From 5b78a4cb63a304a8ced868008cc37c6dbceb46ce Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 7 Jul 2018 04:11:25 +0200 Subject: [PATCH] api: option to hide textures in striptextures --- api/ui-widgets.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api/ui-widgets.lua b/api/ui-widgets.lua index 781022a1..b4567d63 100644 --- a/api/ui-widgets.lua +++ b/api/ui-widgets.lua @@ -489,9 +489,14 @@ end -- [ StripTextures ] -- Strips all textures off a frame. -- 'frame' [frame] the frame that should be stripped. -function pfUI.api.StripTextures(frame) +function pfUI.api.StripTextures(frame, hide) for i,v in ipairs({frame:GetRegions()}) do - if v.SetTexture then v:SetTexture(nil) end + if v.SetTexture then + v:SetTexture(nil) + if hide then + v:Hide() + end + end end end