Well, I haven't worked with this area specifically, but from a quick  
look through the code, I think what you want is an instance of the  
LLHudText class (which is the type of the mText object).

In llviewerobject.cpp, there's this code:

                                        // Setup object text
                                        if (!mText)
                                        {
                                                mText = (LLHUDText  
*)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT);
                                                
mText->setFont(LLFontGL::sSansSerif);
                                                
mText->setVertAlignment(LLHUDText::ALIGN_VERT_TOP);
                                                mText->setMaxLines(-1);
                                                mText->setSourceObject(this);
                                                
mText->setOnHUDAttachment(isHUDAttachment());
                                        }

and then:
                                        mText->setColor(LLColor4(coloru));
                                        mText->setStringUTF8(temp_string);

Is that the hint you're looking for? See llhudtext.h/cpp for more.

        Q


On Mar 23, 2009, at 12:08 AM, Problem Quandry wrote:

> I'm trying to understand the viewer source code a bit better, but  
> I'm still new to it and I'm stumped trying to figure something out.   
> Hopefully someone can help me out.
>
> Objects rendered by the viewer seem to be of type LLViewerObject,  
> and objects can have hover text set on them. So, I assume there's  
> probably some way that the text is connected to the LLViewerObject,  
> but I can't figure out how. Could someone give me an example of  
> referencing an object's hover text using an instance of  
> LLViewerObject object?
>
> Something like:
>
> LLViewerObject obj;
> obj->mText????
>
> Also, if there's some resource that shows a class architecture  
> diagram or any other useful design info on the viewer's code  
> organization, I'd love a hint on where to find it.
>
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/SLDev
> Please read the policies before posting to keep unmoderated posting  
> privileges

_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/SLDev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to