function HostelBar:CreateAnchor(name, text, yoff) if not name then return end local f = CreateFrame("Button", name, UIParent) f:ClearAllPoints() f:SetWidth(200) f:SetHeight(25) f:SetPoint("TOP", UIErrorsFrame, "BOTTOM", 0, yoff) f:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", tile = false, tileSize = 16, edgeSize = 16, insets = { left = 5, right =5, top = 5, bottom = 5 }}) f:SetBackdropColor(1,0,0,.6) f:SetMovable(true) f:RegisterForDrag("LeftButton") f.Text = f:CreateFontString(nil, "OVERLAY") f.Text:SetFontObject(GameFontNormalSmall) f.Text:ClearAllPoints() f.Text:SetTextColor(1, 1, 1, 1) f.Text:SetWidth(200) f.Text:SetHeight(25) f.Text:SetPoint("TOPLEFT", name, "TOPLEFT") f.Text:SetJustifyH("CENTER") f.Text:SetJustifyV("MIDDLE") f.Text:SetText(text) f.Text:Show() f:Show() end