diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-10-13 16:25:48 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-13 16:25:48 +0000 |
commit | 20e56a6925b4d4106059a73a22170beb5a38be1e (patch) | |
tree | 6b9d6dec9f628dfa1ab948cbfb10b86fe4cdc826 /indra/llui/llbutton.cpp | |
parent | 330e635c2ce2ea0650226f56559cf1068df0320d (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1992 https://svn.aws.productengine.com/secondlife/pe/stable-2@2004 -> viewer-2.0.0-3
* Bugs: EXT-1091 EXT-1418 EXT-996 EXT-1150 EXT-1188 EXT-1417 EXT-1181 EXT-1058 EXT-1397 EXT-836 EXT-1437 EXT-1379
* Dev: EXT-1291 EXT-1255 EXT-992 EXT-96 EXT-1157
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r-- | indra/llui/llbutton.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 219c2ee254..f28fca35c5 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -52,6 +52,7 @@ #include "llrender.h" #include "lluictrlfactory.h" #include "llhelp.h" +#include "lldockablefloater.h" static LLDefaultChildRegistry::Register<LLButton> r("button"); @@ -1057,6 +1058,20 @@ void LLButton::setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname) } // static +void LLButton::setDockableFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname) +{ + LLButton* button = dynamic_cast<LLButton*>(ctrl); + if (!button) + return; + // Get the visibility control name for the floater + std::string vis_control_name = LLFloaterReg::declareVisibilityControl(sdname.asString()); + // Set the button control value (toggle state) to the floater visibility control (Sets the value as well) + button->setControlVariable(LLUI::sSettingGroups["floater"]->getControl(vis_control_name)); + // Set the clicked callback to toggle the floater + button->setClickedCallback(boost::bind(&LLDockableFloater::toggleInstance, sdname)); +} + +// static void LLButton::showHelp(LLUICtrl* ctrl, const LLSD& sdname) { // search back through the button's parents for a panel |