Skip to content

Instantly share code, notes, and snippets.

@Road-block
Created December 13, 2016 20:19
Show Gist options
  • Save Road-block/c7f1929bc56c4b3bd8fbf70fcbd399d8 to your computer and use it in GitHub Desktop.
Save Road-block/c7f1929bc56c4b3bd8fbf70fcbd399d8 to your computer and use it in GitHub Desktop.
Darker UI script
local GetChildrenTree
local f = CreateFrame("Frame")
f:SetScript("OnEvent",function()
GetChildrenTree(UIParent)
end)
f:RegisterEvent("PLAYER_ENTERING_WORLD")
function GetChildrenTree(Parent)
if Parent:GetChildren() then
for _, Child in pairs({Parent:GetChildren()}) do
for _,r in pairs({Child:GetRegions()}) do
if r:GetObjectType() == "Texture" then
r:SetVertexColor(0.2,0.2,0.2) -- 1.0 = 100% light, 0.0 = 100% dark, 0.2 = 20% brightness
end
end
GetChildrenTree(Child)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment