-
Posted by l3gsh0t on Tue, 01 Feb 2011 22:38:16
I'm trying to find out how to send text to the MessageFrame that wow uses for entering a new zone. UIErrorsFrame looks pretty close to me, but it's a little too high, and the font doesn't look quite the same.
Am I understanding this wrong?
-
Posted by jnwhiteh on Tue, 01 Feb 2011 22:56:39
Mouse over it with /framestack when you move between zones, it'll be listed there.
-
Posted by l3gsh0t on Wed, 02 Feb 2011 00:56:48
Let me start off by saying, thanks for the /framestack. I'm sure I'll find some use for this. However, this time wasn't the time. I tried changing zones and hovering over it, but it only suggests that it's the UIParent / WorldFrame. I do see the UIErrorsFrame, but the zone text frame doesn't show up.
Any other suggestions?
-
Posted by jnwhiteh on Wed, 02 Feb 2011 09:32:52
Maybe it is the UI errors frame. At a first glance: http://wowprogramming.com/utils/xmlbrowser/live/FrameXML/ZoneText.lua seems like a good candidate!
-
Posted by l3gsh0t on Wed, 02 Feb 2011 17:22:36
I ended up abandoning this idea, and just made my own frame instead. Here's what it looks like, thanks to a little help from a snippet I found on this site.
TextFrame = CreateFrame("Frame"); TextFrame:ClearAllPoints(); TextFrame:SetHeight(300); TextFrame:SetWidth(300); TextFrame:SetScript("OnUpdate", HS_TextFrame_OnUpdate) TextFrame:Hide(); TextFrame.text = TextFrame:CreateFontString(nil, "BACKGROUND", "PVPInfoTextFont"); TextFrame.text:SetAllPoints(); TextFrame:SetPoint("CENTER", 0, 200); HS_TextFrameTime = 0; function HS_TextFrame_OnUpdate() if (HS_TextFrameTime < GetTime() - 3) then local alpha = TextFrame:GetAlpha(); if (alpha ~= 0) then TextFrame:SetAlpha(alpha - .05); end if (aplha == 0) then TextFrame:Hide(); end end end function HS_TextMessage(message) TextFrame.text:SetText(message); TextFrame:SetAlpha(1); TextFrame:Show(); HS_TextFrameTime = GetTime(); end
Just call the HS_TextMessage whenever I want something in the middle of the screen. It holds for three seconds then fades out.