View Single Post
04-21-10, 06:14 PM   #5
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Code:
local skipframes = {}
skipframes["MinimapPing"] = true
skipframes["MinimapBackdrop"] = true

local children = {}

function GetChildrenTree(Frame) 
  if Frame:GetChildren() then
    for _,child in pairs({Frame:GetChildren()}) do
      if not skipframes[child:GetName()] then
        tinsert(children,child);
      end
      GetChildrenTree(child);
    end 
  end
end

GetChildrenTree(Minimap)
This is a recursive function so it will call itself until it gets all the Minimap children (not just the first level ones).
It will also not add anything found in skipframes instead of adding them
just to remove them again later.
  Reply With Quote