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 | |
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')
-rw-r--r-- | indra/newview/llfloatertoybox.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloatertoybox.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_toybox.xml | 5 |
3 files changed, 17 insertions, 11 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; } diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h index bb9392a0e3..3574e060bf 100644 --- a/indra/newview/llfloatertoybox.h +++ b/indra/newview/llfloatertoybox.h @@ -31,10 +31,10 @@ class LLButton; +class LLToolBar; -class LLFloaterToybox -: public LLFloater +class LLFloaterToybox : public LLFloater { public: LLFloaterToybox(const LLSD& key); @@ -53,6 +53,7 @@ protected: public: LLButton * mBtnRestoreDefaults; + LLToolBar * mToolBar; }; #endif // LL_LLFLOATERTOYBOX_H diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 1951497309..5f3a59d964 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -11,6 +11,7 @@ legacy_header_height="18" name="Toybox" open_centered="true" + save_rect="true" single_instance="true" title="Customize toolbars" width="658"> @@ -45,7 +46,11 @@ <toolbar bottom="395" left="40" + max_button_width="140" + min_button_width="140" + name="toybox_toolbar" right="-40" + side="top" top="85"> </toolbar> <button |