Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
Advertisement

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[]

  • Frames are shown by default when they are created.
  • Setting the region's alpha to zero would make it invisible but still interactable.

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
Advertisement