View Single Post
09-16-19, 03:46 PM   #3
tirafesi
A Murloc Raider
Join Date: Sep 2019
Posts: 8
Originally Posted by SDPhantom View Post
Depends on what you're doing with the text. Essentially, text on screen are FontString objects.
Yeah, that's how I did it. But I was wondering if there was a more compact way of doing this without having to write 8 lines of code just to show one sentence ;-;

Code:
local msgFrame = CreateFrame("FRAME", nil, UIParent)
msgFrame:SetWidth(1)
msgFrame:SetHeight(1)
msgFrame:SetPoint("CENTER")
msgFrame:SetFrameStrata("TOOLTIP")
msgFrame.text = msgFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
msgFrame.text:SetPoint("CENTER")
msgFrame.text:SetText("Hello World")
  Reply With Quote