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

Hello,

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.

Code:
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:SetAllPoints(true)
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:
Code:
myMsgFrame:AddMessage(string, r, g, b, nil, holdTime)
Thank you.

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