Region:SetIgnoreParentScale

From Warcraft Wiki
Jump to navigation Jump to search
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png Region:GetScale
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png Region:GetEffectiveScale
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png Region:SetScale
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png Region:SetIgnoreParentScale
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png Region:IsIgnoringParentScale

Sets whether the region should ignore its parent's scale.

Region:SetIgnoreParentScale(ignore)

Arguments

ignore
boolean

Example

Scale propagates from a region to its children, unless disabled with SetIgnoreParentScale.

local parent = CreateFrame("Frame")
parent:SetScale(0.5)

local f = CreateFrame("Frame", nil, parent)
f:SetScale(0.5)
print(f:GetScale())          -- 0.5
print(f:GetEffectiveScale()) -- 0.25

f:SetIgnoreParentScale(true)
print(f:GetEffectiveScale()) -- 0.5