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>
_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges