Wowpedia
Advertisement
Wowpedia
240,442
pages

Specified a size scaling to be applied to the Region (and its children).

region:SetScale(newScale)

Arguments

newScale 
Number - New scale applied to this region and its children; must be greater than 0, 1 indicates no additional scaling.

Example

The MinimapCluster and all of its child frames will become scaled 1.2 times from their parent.

MinimapCluster:SetScale(1.2);

Details

Since the API presentation is scaled, each object has its own internal notion of size, which is only relative to the actual size it appears on-screen. UIParent will have a reasonable scaling factor selected by the game engine, from which all of the child UI elements are then derived. This function can be used to selectively change the scale of a component relative to its parent such that it appears to become bigger or smaller. UI elements with appropriately specified anchor points and sizes should scale quite cleanly.

Also see LibWindow-1.1's approach to saving positions of "window"-style frames:

Libwindow-scaling.png

Patch changes

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

See also

References

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