Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

GetUIParentAnchor

Last wiki revision 2007-08-26

Returns SetPoint args for the frame, anchor is relative to the nearest corner of the screen.

local function GetUIParentAnchor(frame) local w, h, x, y = UIParent:GetWidth, UIParent:GetHeight, frame:GetCenter local hhalf, vhalf = (x > w/2) and "RIGHT" or "LEFT", (y > h/2) and "TOP" or "BOTTOM" local dx = hhalf == "RIGHT" and math.floor(frame:GetRight + 0.5) - w or math.floor(frame:GetLeft + 0.5) local dy = vhalf == "TOP" and math.floor(frame:GetTop + 0.5) - h or math.floor(frame:GetBottom + 0.5) return vhalf..hhalf, dx, dy end

Source

https://warcraft.wiki.gg/wiki/GetUIParentAnchor · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.