From 565483ee1f2ea7b8d525c6d89700452216481c5e Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 22 Sep 2011 15:43:08 -0700 Subject: 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. --- indra/newview/llfloatertoybox.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview/llfloatertoybox.cpp') 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("btn_restore_defaults"); + mToolBar = getChild("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; } -- cgit v1.2.3