This is a guide for how to use the <Anchors> xml tag and how to use the WindowClearAnchors() and WindowAddAnchor() functions to dynamically reposition windows on the fly.
Anchoring | This is a guide for how to use the <Anchors> xml tag and how to use the WindowClearAnchors() and WindowAddAnchor() functions to dynamically reposition windows on the fly. |
XML Defintion | |
Set Anchor on the fly | You can set anchor of a window on the fly in the lua code: The following code resets the window to current cursor position to show the “dragging” effect. |
<Anchors>
<Anchor point="topright" relativePoint="bottomleft" relativeTo="">
<AbsPoint x="0" y="0" />
</Anchor>
</Anchors>
You can set anchor of a window on the fly in the lua code: The following code resets the window to current cursor position to show the “dragging” effect.
WindowClearAnchors( windowName )
WindowAddAnchor( windowName, "topleft", "Root", "topleft", SystemData.MousePosition.x, SystemData.MousePosition.y+150)