wowpedia
Main Menu


Returns whether the region (and its parents) are shown.

isShown   = ScriptRegion:IsShown()
isVisible = ScriptRegion:IsVisible()

Returns

isShown
boolean - True if the region should be shown, but it depends on the parents if it's visible.
isVisible
boolean - True if the region and its parents are shown, making it effectively visible.

Details

Example

local f = CreateFrame("Frame", nil, nil, "BackdropTemplate")
f:SetPoint("CENTER")
f:SetSize(200, 200)
f:SetBackdrop(BACKDROP_TUTORIAL_16_16)
-- the region is visible
print(f:IsShown(), f:IsVisible()) -- true, true

-- parent it to a hidden frame
local g = CreateFrame("Frame")
g:Hide()
f:SetParent(g)
-- the region is no longer visible
print(f:IsShown(), f:IsVisible()) -- true, false