What's the simplest way to show a message on screen?
What's the simplest way to show a message on the screen? (outside of printing to the chat)
Something that I can show / hide whenever. |
Depends on what you're doing with the text. Essentially, text on screen are FontString objects.
|
Quote:
Code:
local msgFrame = CreateFrame("FRAME", nil, UIParent) |
Quote:
Code:
message("Hello World") Code:
local text = UIParent:CreateFontString(nil, "OVERLAY", "GameFontHighlight") |
D'oh.. it didn't even occur to me that I can make my own message box rofl
A frame with a border, and YES/NO/OK buttons as needed and a text box or two ( title, content ) and turn it into a template to use as needed. |
Oh, I can create the FontString directly from UIParent? Perfect! Exactly what I was looking for :D
|
If you just want text to appear on screen like an in-game message/warning would (out of range, etc.), then use the message() function.
(If that's even still in the client... It was deprecated long ago. If that doesn't work, then use UIErrorsFrame:AddMessage("text") - https://wow.gamepedia.com/API_MessageFrame_AddMessage) If you want to control when it disappears off-screen, then create your own fontstring and show it or change the text as needed. |
All times are GMT -6. The time now is 08:29 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI