[opensource-dev] "Adding a dialog" outdated

Oz Linden (Scott Lawrence) oz at lindenlab.com
Thu Oct 18 07:51:23 PDT 2012


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 
<https://bitbucket.org/lindenlab/viewer-release/src/f32c39fdfcfe21df2ba8a866eeda47de6713dc46/indra/newview/llviewerfloaterreg.cpp?at=default#cl-266>:

  LLFloaterReg::add("prefs_autoreplace",  "floater_autoreplace.xml",  (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAutoReplaceSettings>);



It is then shown by code in newview/llfloaterpreference.cpp 
<https://bitbucket.org/lindenlab/viewer-release/src/f32c39fdfcfe21df2ba8a866eeda47de6713dc46/indra/newview/llfloaterpreference.cpp?at=default>:

     LLFloaterReg::showInstance("prefs_autoreplace");


The code for that floater is in newview/llfloaterautoreplacesettings.cpp 
<https://bitbucket.org/lindenlab/viewer-release/src/f32c39fdfcfe21df2ba8a866eeda47de6713dc46/indra/newview/llfloaterautoreplacesettings.cpp?at=default>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20121018/1cbb87e2/attachment.htm 


More information about the opensource-dev mailing list