WoW:API EnumerateFrames: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
(upgraded deprecated template)
Line 1: Line 1:
{{wowapi}}
<center>'''EnumerateFrames''' ''-Documentation by [[user:Aradan|Aradan]]-''</center>
<center>'''EnumerateFrames''' ''-Documentation by [[user:Aradan|Aradan]]-''</center>


Line 30: Line 31:
----
----
__NOTOC__
__NOTOC__
{{Template:WoW API}}

Revision as of 18:14, 6 January 2007

WoW API < EnumerateFrames

EnumerateFrames -Documentation by Aradan-

Returns frame which follows current frame, or first frame if argument is nil.

nextFrame = EnumerateFrames({currentFrame})

Parameters

Arguments

({currentFrame})
currentFrame
Table - current frame or nil to get first frame

Returns

nextFrame
nextFrame
Table - the frame following currentFrame or nil if no more frames

Example

local frame = EnumerateFrames()
while frame do
    if frame:IsVisible() and MouseIsOver(frame) then
        DEFAULT_CHAT_FRAME:AddMessage(frame:GetName())
    end
    frame = EnumerateFrames(frame)
end

Result

Prints the names of all visible frames under the mouse cursor to the default chat frame.