[opensource-dev] "Adding a dialog" outdated
Richard Nelson
richard at lindenlab.com
Fri Oct 19 09:30:56 PDT 2012
Yes, LLFloaterReg is the current mechanism for creating and displaying new
types of floaters (windows).
There is a separate mechanism for "notification" style dialogs, in
llnotifications*.h/cpp, appropriately enough. Unfortunately, I don't
think there is good documentation in the wiki for that yet. The closest
thing is probably http://wiki.secondlife.com/wiki/Adding_UI_Hints.
Usually the term "dialog" maps to our concept of "notification" so I'm
guessing that might actually be more appropriate in your case.
R.
On Thu, 18 Oct 2012 07:51:23 -0700, Oz Linden (Scott Lawrence)
<oz at lindenlab.com> wrote:
> On 2012-10-18 09:41 , CJ Davies wrote:
>> I'm trying to follow the "Adding a dialog" page on the wiki
>>
>> http://wiki.secondlife.com/wiki/Adding_a_dialog
>>
>> however I suspect it hasn't been updated to reflect changes to the
>> codebase & as such I can't get it to work. In particular,
>>
>> LLUICtrlFactory::getInstance()->buildFloater(this, "floater_foo.xml");
>>
>> doesn't compile as there is no buildFloater method in LLUICtrlFactory.
>> Can anybody shed some light on how we now go about creating dialogs?
>>
>
> It's possible (likely, even) that there's more than one way, but one I
> worked on recently worked this way....
>
> The floater is registered in newview/llviewerfloaterreg.cpp:
> LLFloaterReg::add("prefs_autoreplace", "floater_autoreplace.xml",
> (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAutoReplaceSettings>);
>
>
>
> It is then shown by code in newview/llfloaterpreference.cpp:
> LLFloaterReg::showInstance("prefs_autoreplace");
>
>
> The code for that floater is in newview/llfloaterautoreplacesettings.cpp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20121019/a1453aff/attachment.htm
More information about the opensource-dev
mailing list