Returns the next frame following the frame passed, or nil if no more frames exist


See also Utility functions.

Signature:

nextFrame = EnumerateFrames([currentFrame])

Arguments:

  • currentFrame - The current frame to get the next frame, or nil to get the first frame (table)

Returns:

  • nextFrame - The frame following currentFrame or nil if no more frames exist, or the first frame if nil was passed (table)

Examples:

-- Print all visible frames under the mouse cursor
local frame = EnumerateFrames(); -- Get the first frame
while frame do
  if ( frame:IsVisible() and MouseIsOver(frame) ) then
    print(frame:GetName() or string.format("[Unnamed Frame: %s]", tostring(frame)));
  end
  frame = EnumerateFrames(frame); -- Get the next frame
end