Wowpedia
Advertisement
Wowpedia
240,483
pages

Regions, abstract rectangular areas on the screen to position user interface elements, will scale relative to their parent (if any) unless overriden by SetIgnoreParentScale() such that the region IsIgnoringParentScale()

region:SetIgnoreParentScale(shouldIgnore)
isIgnoring = region:IsIgnoringParentScale()

Arguments

shouldIgnore 
Boolean - True to ignore parent scale, or false to resume following it

Returns

isIgnoring 
Boolean - True if ignoring parent scale, or false otherwise

Examples

local parent = CreateFrame("Frame")
local child = CreateFrame("Frame", nil, parent)
child:SetScale(0.5)
print(child:GetEffectiveScale())                 -- 0.5
parent:SetScale(0.5)
print(child:GetEffectiveScale())                 -- 0.25
child:SetIgnoreParentScale(true)
print(child:GetEffectiveScale())                 -- 0.5

Details

  • These methods may be used regardless if the region actually has a parent from which to inherit effective scale
  • Once ignoring parent scale, Region:GetEffectiveScale will return the same value set using Region:SetScale

Patch changes

  • Battle for Azeroth Patch 8.0.1 / API (2018-07-17): Moved to Region:SetIgnoreParentScale() and Region:IsIgnoringParentScale()[1]
    Previously Frame:SetIgnoreParentScale() and Frame:IsIgnoringParentScale()

See also

References

 
  1. ^ Blizzard Entertainment Aerythlea 2018-11-14. Battle for Azeroth Addon Changes.
Advertisement