View Single Post
02-13-11, 02:10 AM   #4
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
I think I understand (I think) . Thank you both. What I'm doing is all in Lua, I'm just perusing the XML files to find the correct name of the thing I'm trying to color.

For example (using red for dramatic effect ):
Code:
for _, x in pairs({MinimapBorder, MiniMapMailBorder}) do
    if x:GetObjectType() == "Texture" then
        x:SetVertexColor(1, 0, 0)
    end
end


Originally Posted by Seerah View Post
To get the name of something's parent via Lua, you do widget:GetParent().
So if I wanted to color the tracking button border, would it be something like this:

Code:
for _, x in pairs({MinimapBorder, MiniMapMailBorder, MiniMapTracking:GetParent(border)}) do
    if x:GetObjectType() == "Texture" then
        x:SetVertexColor(1, 0, 0)
    end
end
(I've got something wrong there cuz that no worky.) Here's the part of Minimap.xml I'm looking at:

Code:
<Frame name="MiniMapTracking">
...
<Layer level="BORDER">
<Texture name="$parentBorder" urgency="5" file="Interface\Minimap\MiniMap-TrackingBorder">
  Reply With Quote