1. #1

    fontstring positioning. need help

    thats what i use in my current addon:

    -- frametest
    f = CreateFrame("MessageFrame", "frametest", UIParent)
    f:SetHeight(32)
    f:SetWidth(256)
    f:SetPoint("LEFT", UIParent)
    f:Show()
    local font = frametest:CreateFontString(nil,"OVERLAY")
    font:SetFontObject("GameFontNormal")
    font:SetHeight(32)
    font:SetWidth(256)
    font:SetPoint("LEFT", frametest, "BOTTOM")
    font:SetText("text " .. variable1 .. " text2 " .. varianle2 .. " more text")

    the problem is -> imagine a box. and the box is at the left side of the screen in the middle.
    now inside the box shall be text. i tell the text to be at the bottom left of the box, but its mid/mid.
    no matter what i tell it where to be its always wrong...

  2. #2

    Re: fontstring positioning. need help

    You set the height and width of your font-string to the same as the parent-frame.
    I'm not 100% sure on this but I'd try making the width and height smaller, and use the built-in font-size option to change the font size. I think it's showing up in the bottom middle because effectively you have a box, in another box, and on that second-inside box, you have text which is centered.

    again I'm not 100% sure, and I don't have that much experience with font-strings

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •