Advertisement
Guest User

BlackUI

a guest
Jul 4th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. local GetChildrenTree
  2.  
  3. local f = CreateFrame("Frame")
  4.  
  5. f:SetScript("OnEvent",function()
  6.  
  7. GetChildrenTree(UIParent)
  8.  
  9. end)
  10.  
  11. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  12.  
  13. function GetChildrenTree(Parent)
  14.  
  15. if Parent:GetChildren() then
  16.  
  17. for _, Child in pairs({Parent:GetChildren()}) do
  18.  
  19. for _,r in pairs({Child:GetRegions()}) do
  20.  
  21. if r:GetObjectType() == "Texture" then
  22.  
  23. r:SetVertexColor(0.2,0.2,0.2) -- 1.0 = 100% light, 0.0 = 100% dark, 0.2 = 20% brightness
  24.  
  25. end
  26.  
  27. end
  28.  
  29. GetChildrenTree(Child)
  30.  
  31. end
  32.  
  33. end
  34.  
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement