View Single Post
07-13-10, 02:00 PM   #15
wellbeing
A Cliff Giant
Join Date: Oct 2009
Posts: 71
Originally Posted by Seerah View Post
When you did that, did you use double slashes? \\
good point, i tried both.
here is my code now:

when i call the function:
Code:
CreateText("test","TEST!!",25,-25,f,512,64,"TOP","TOP")
the function:

Code:
function CreateText(name,text,x,y,parent,w,h,relativeto,relativepoint)
  
    Parent = parent
  

  local Name = name
  local TextX = x
  local TextY = y
  local RelativeTo = relativeto
  local RelativePoint = relativepoint
  local TextWidth = w
  local TextHeight = h
  local Text = text

  local FrameLevel = 4

  local TextFrame = CreateFrame("FRAME",Name,Parent)
  TextFrame:ClearAllPoints()
  TextFrame:SetWidth(TextWidth)
  TextFrame:SetHeight(TextHeight)
  --local TextFrameFont = TextFrame:CreateFontString(nil, "BACKGROUND")
  --TextFrameFonttemp = TextFrame:CreateFontString(nil, "BACKGROUND",GameFontNormal)
  --local Path, Size, Flags = TextFrameFonttemp:GetFont()
  TextFrameFont = TextFrame:CreateFontString(nil, "BACKGROUND")
  TextFrameFont:SetText(Text)
  TextFrameFont:SetFont("\\Interface\AddOns\myaddonname\fonts\fontname.ttf", 20)

   
end
frustrashun.
  Reply With Quote