WoW:API Region IsVisible: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 29: Line 29:
;''Description''
;''Description''


: Gets the visible state of an object.
: Gets the visible state of an object, meaning if it's shown and all it's parents are shown aswell.


:If a parent of a frame calls Hide(), then all of it's children are hidden. In this case, it's children are "visible", but not "shown".
:If a frame calls Hide(), then all of it's children are hidden. In this case, its children are "shown" (if they were prior to the Hide() call), but not "visible".
:The default UI uses this in a couple of places to tell whether or not the entire UI has been hidden for screenshot purposes (visible is true, but shown isn't)
:The default UI uses this in a couple of places to tell whether or not the entire UI has been hidden for screenshot purposes (visible is false while shown is true)
----
----
{{Template:WoW API}}
{{Template:WoW API}}

Revision as of 04:25, 31 January 2006

IsVisible -Documentation by Kisk-

Gets the visible state of an object.

obj:IsVisible();

Arguments
nil

Returns
Boolean

Example
if (MyFrame:IsVisible()) then
    -- Frame is visible
elseif (not MyFrame:IsVisible()) then
    -- Frame is not visible
end
Result
The if function fires the corresponding statements based on the boolean value returned by MyFrame:IsVisible()

Description
Gets the visible state of an object, meaning if it's shown and all it's parents are shown aswell.
If a frame calls Hide(), then all of it's children are hidden. In this case, its children are "shown" (if they were prior to the Hide() call), but not "visible".
The default UI uses this in a couple of places to tell whether or not the entire UI has been hidden for screenshot purposes (visible is false while shown is true)

Template:WoW API