XML/Anchor
< XML
Jump to navigation
Jump to search
<Anchors> (child of <LayoutFrame>) defines a widget's anchors by enclosing <Anchor> tags. <Line> also introduces <StartAnchor> and <EndAnchor> with the same attributes as <Anchor>
<Anchors> <Anchor point="" relativeKey="" relativeTo="" relativePoint="" x="" y=""> <Offset /> </Anchor> </Anchors>
Child elements
<Anchor> defines a single point to align a <LayoutFrame>.
- point (ui:FRAMEPOINT) - Point to align.
- relativeTo (xs:string? ) - Another widget to align against (in _G).
- relativeKey (string? ) - Another widget to align against (sibling).
- relativePoint (ui:FRAMEPOINT? ) - Point on the other widget to align against (defaults to the same as point)
- x (xs:float? ) - Horizontal offset in lieu of an <Offset> tag.
- y (xs:float? ) - Vertical offset in lieu of an <Offset> tag.
<Offset> inherits from <Dimension>
<Dimension> defines a dimension (size, offset, etc.) as x and y, or with a child element to specify the coordinate system.
- x (xs:int? ) - Horizontal distance affected by UI scaling; (+) right and (-) left.
- y (xs:int? ) - Vertical distance affected by UI scaling; (+) up and (-) down.
<AbsDimension> defines coordinates in scaling-dependent units (same as <Dimension>).
- x (xs:int) - Horizontal distance affected by UI scaling; (+) right and (-) left.
- y (xs:int) - Vertical distance affected by UI scaling; (+) up and (-) down.
<RelDimension> defines coordinates relative to the entire screen, where 0 and 1 are the edges.
- x (xs:float) - Ratio of screen width, from left to right edges.
- y (xs:float) - Ratio of screen height, from bottom to top edges.
Details
- Not required with <LayoutFrame setAllPoints="true">.
Patch changes
- Patch 7.0.3 (2016-07-19): <Line> added with <StartAnchor> and <EndAnchor>[1]
- Patch 6.2.0 (2015-06-23): Added
relativeKey
attribute.[2]
See also
- Region:SetPoint() - Sets an anchor after the widget is created.
References
- ^ 2016-07-19, UI.xsd, version 7.0.3.22267, near line 537, archived at Townlong-Yak
- ^ 2015-06-22, UI.xsd, version 6.2.0.20173, near line 393, archived at Townlong-Yak