I had an idea for an addon I wanted to do, which would require a list of items in a window, but how would I get it to scroll? Imagine the quest description, and how it scrolls if the quest is big enough... that's what I want to do but with different information
of course. Any idea on how I'd do that? I tried "ScrollingMessageFrame1:AddMessage();" but it didn't work.
Dec 20, 2007 at 7:35 AM
If you're looking to build a window exactly like the quest log, I'd suggest looking at the source code for the quest log frame. To do this, you'll first need to download the Interface Extraction tool from Blizzard at
http://us.blizzard.com/support/article.xml?articleId=21466 which will extract a bunch of directories under your
Program Files\World of Warcraft\ directory. But basically it looks like you're trying to call a member on a frame that doesn't exist. Frames are more like containers for other controls (buttons, fontstring, editbox, etc) so you'd want to call SetText() on
the fontstring inside a messageframe and setup the inherits property. Again for more info, check out the QuestFrame.xml.
Specifically, you'll want to look at: "\Program Files\World of Warcraft\Blizzard Interface Data (enUS)\FrameXML\"
You can start an empty project in AddOn Studio and add these files in the solution explorer by right clicking and selecting
Add Existing Items and navigating to that directory. Note that I noticed a bug when opening QuestFrame.xml in the designer that showed it incorrectly parsing the XML so you'll probably have to go through the XML view manually.
Back to the Questframe style, a quick cursory look at QuestFrame.Lua shows what appears to be the way they handle the scrolling text fading in/out.
if ( this.fading ) then
this.fadingProgress = this.fadingProgress + (elapsed * QUESTDESCRIPTIONGRADIENT_CPS);
if ( not QuestDescription:SetAlphaGradient(this.fadingProgress, QUESTDESCRIPTIONGRADIENT_LENGTH) ) then
this.fading = nil;
-- Show Quest Objectives and Rewards
if ( QUESTFADINGDISABLE == "0" ) then
UIFrameFadeIn(TextAlphaDependentFrame, QUESTINFOFADEIN );
Hope this helps,