diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-09-22 15:43:08 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-09-22 15:43:08 -0700 |
commit | 565483ee1f2ea7b8d525c6d89700452216481c5e (patch) | |
tree | ea7f3991deec677ddd775f8c3b80ed2fa7c9c92d /indra/newview/llfloatertoybox.cpp | |
parent | 6c209d0fc8c8b171262074e1970c4e9ff299f9f0 (diff) |
EXP-1205 PROGRESS -- As a User, I want a toybox which will contain all buttons that I can d&d into the toolbars
EXP-1233 PROGRESS -- Populate the toybox floater window with all FUI toolbar buttons
EXP-1236 FIX -- The toybox floater should remember its position for the user
* Basic addCommand function to the LLToolBar. Need proper implementation.
* Added map for faster lookup of commands
* Toybox now adds commands to its toolbar for basic button setup
Reviewed by Richard.
Diffstat (limited to 'indra/newview/llfloatertoybox.cpp')
-rw-r--r-- | indra/newview/llfloatertoybox.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index b4fb2e45ab..eaaaeb3357 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -29,12 +29,15 @@ #include "llfloatertoybox.h" #include "llbutton.h" +#include "llcommandmanager.h" #include "llpanel.h" +#include "lltoolbar.h" LLFloaterToybox::LLFloaterToybox(const LLSD& key) : LLFloater(key) , mBtnRestoreDefaults(NULL) + , mToolBar(NULL) { mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this)); } @@ -48,23 +51,20 @@ BOOL LLFloaterToybox::postBuild() center(); mBtnRestoreDefaults = getChild<LLButton>("btn_restore_defaults"); + mToolBar = getChild<LLToolBar>("toybox_toolbar"); // // Create Buttons // -/* - LLToyboxButtons::load(); - for (size_t i = 0; i < LLToyboxButtons::buttonCount(); i++) - { - LLToyboxButton * button = LLToyboxButtons::get(i); + LLCommandManager& cmdMgr = LLCommandManager::instance(); - // Panel opacity depends on whether or not button position is established - LLPanel * buttonPanel = createPanelForButton(button); + for (U32 i = 0; i < cmdMgr.commandCount(); i++) + { + LLCommand * command = cmdMgr.getCommand(i); - mToolBar->add(buttonPanel); + mToolBar->addCommand(command); } -*/ return TRUE; } |