WoW:API Frame SetScale: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Move page script moved page API Frame SetScale to API Frame SetScale without leaving a redirect) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{widgetmethod}} | |||
Specified a size scaling to be applied to the object (and its children). | Specified a size scaling to be applied to the object (and its children). | ||
Line 26: | Line 26: | ||
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. The 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. | 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. The 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. | ||
Latest revision as of 04:45, 15 August 2023
← Widget API ← Frame < SetScale
Specified a size scaling to be applied to the object (and its children).
obj:SetScale(newScale);
- Arguments
- newScale
- The new scaling of this object and its children, relative to its parent.
- Returns
- nil
- Example
MinimapCluster:SetScale(1.2);
- Result
- The MinimapCluster and all of its child frames will become scaled 1.2 times from their parent.
- Description
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. The 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.