Quantcast WoWInterface - View Single Post - Create a single-line MessageFrame?
View Single Post
09-29-19, 05:19 AM   #1
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 59
Create a single-line MessageFrame? (SOLVED)


I can't figure how to create a single-line MessageFrame, is order to display a string during a certain time, and then fade out.

local myMsgFrame = CreateFrame("MessageFrame", "myAddon_myMsgFrame", UIParent)
myMsgFrame:SetSize(200, 20)
myMsgFrame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 80, 200);
-------------- texture
local texture = myMsgFrame:CreateTexture(nil,"BACKGROUND")
texture:SetColorTexture(0, 0, 0, 0.6)
myMsgFrame.texture = texture
-------------- text
myMsgFrame.text = myMsgFrame:CreateFontString(nil, nil, "GameFontNormal")
myMsgFrame.text:SetPoint("topleft", 4, 1)
... ?

I would like to use it in my scripts with:
myMsgFrame:AddMessage(string, r, g, b, nil, holdTime)
Thank you.

Last edited by Zax : 09-30-19 at 09:31 AM.
  Reply With Quote