diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-09-28 16:54:34 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-09-28 16:54:34 -0700 |
commit | fdf042bdb9aeefa209694e04d4012a3a1f911a52 (patch) | |
tree | 37c27b51ac8d940b49073f27da35442f0c6029cc /indra/newview | |
parent | fc0f5173eb20fad8934420e6eec8873d71490894 (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 FIX -- Populate the toybox floater window with all FUI toolbar buttons indicated as such in the "commands.xml" definition.
EXP-1267 FIX -- Enable/disable buttons in the toybox
* Hooked up button callbacks to the toolbar buttons
* Fixed toybox button enable/disable to function properly and live update as
buttons change states.
* Removed the toybox toolbar background image
Reviewed by Leyla
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/commands.xml | 42 | ||||
-rw-r--r-- | indra/newview/llfloatertoybox.cpp | 19 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_toybox.xml | 4 |
3 files changed, 38 insertions, 27 deletions
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 4a33b24075..5fbd9248c1 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -6,7 +6,7 @@ label_ref="Command_Avatar_Label" tooltip_ref="Command_Avatar_Tooltip" function="Floater.ToolbarToggle" - param="avatar" + parameter="avatar" /> <command name="build" available_in_toybox="true" @@ -14,7 +14,7 @@ label_ref="Command_Build_Label" tooltip_ref="Command_Build_Tooltip" function="Floater.ToolbarToggle" - param="build" + parameter="build" /> <command name="chat" available_in_toybox="true" @@ -22,7 +22,7 @@ label_ref="Command_Chat_Label" tooltip_ref="Command_Chat_Tooltip" function="Floater.ToolbarToggle" - param="chat" + parameter="chat" /> <command name="compass" available_in_toybox="false" @@ -30,7 +30,7 @@ label_ref="Command_Compass_Label" tooltip_ref="Command_Compass_Tooltip" function="Floater.ToolbarToggle" - param="compass" + parameter="compass" /> <command name="gestures" available_in_toybox="true" @@ -38,7 +38,7 @@ label_ref="Command_Gestures_Label" tooltip_ref="Command_Gestures_Tooltip" function="Floater.ToolbarToggle" - param="gestures" + parameter="gestures" /> <command name="howto" available_in_toybox="true" @@ -46,7 +46,7 @@ label_ref="Command_HowTo_Label" tooltip_ref="Command_HowTo_Tooltip" function="Floater.ToolbarToggle" - param="howto" + parameter="howto" /> <command name="landmarks" available_in_toybox="true" @@ -54,7 +54,7 @@ label_ref="Command_Landmarks_Label" tooltip_ref="Command_Landmarks_Tooltip" function="Floater.ToolbarToggle" - param="landmarks" + parameter="landmarks" /> <command name="map" available_in_toybox="true" @@ -62,7 +62,7 @@ label_ref="Command_Map_Label" tooltip_ref="Command_Map_Tooltip" function="Floater.ToolbarToggle" - param="map" + parameter="map" /> <command name="minimap" available_in_toybox="true" @@ -70,7 +70,7 @@ label_ref="Command_MiniMap_Label" tooltip_ref="Command_MiniMap_Tooltip" function="Floater.ToolbarToggle" - param="minimap" + parameter="minimap" /> <command name="move" available_in_toybox="true" @@ -78,7 +78,7 @@ label_ref="Command_Move_Label" tooltip_ref="Command_Move_Tooltip" function="Floater.ToolbarToggle" - param="move" + parameter="move" /> <command name="myland" available_in_toybox="true" @@ -86,7 +86,7 @@ label_ref="Command_MyLand_Label" tooltip_ref="Command_MyLand_Tooltip" function="Floater.ToolbarToggle" - param="myland" + parameter="myland" /> <command name="mystuff" available_in_toybox="true" @@ -94,7 +94,7 @@ label_ref="Command_MyStuff_Label" tooltip_ref="Command_MyStuff_Tooltip" function="Floater.ToolbarToggle" - param="mystuff" + parameter="mystuff" /> <command name="people" available_in_toybox="true" @@ -102,7 +102,7 @@ label_ref="Command_People_Label" tooltip_ref="Command_People_Tooltip" function="Floater.ToolbarToggle" - param="people" + parameter="people" /> <command name="places" available_in_toybox="true" @@ -110,7 +110,7 @@ label_ref="Command_Places_Label" tooltip_ref="Command_Places_Tooltip" function="Floater.ToolbarToggle" - param="places" + parameter="places" /> <command name="search" available_in_toybox="true" @@ -118,7 +118,7 @@ label_ref="Command_Search_Label" tooltip_ref="Command_Search_Tooltip" function="Floater.ToolbarToggle" - param="search" + parameter="search" /> <command name="settings" available_in_toybox="true" @@ -126,7 +126,7 @@ label_ref="Command_Settings_Label" tooltip_ref="Command_Settings_Tooltip" function="Floater.ToolbarToggle" - param="settings" + parameter="settings" /> <command name="shop" available_in_toybox="true" @@ -134,7 +134,7 @@ label_ref="Command_Shop_Label" tooltip_ref="Command_Shop_Tooltip" function="Floater.ToolbarToggle" - param="shop" + parameter="shop" /> <command name="snapshot" available_in_toybox="true" @@ -142,7 +142,7 @@ label_ref="Command_Snapshot_Label" tooltip_ref="Command_Snapshot_Tooltip" function="Floater.ToolbarToggle" - param="snapshot" + parameter="snapshot" /> <command name="speak" available_in_toybox="true" @@ -150,7 +150,7 @@ label_ref="Command_Speak_Label" tooltip_ref="Command_Speak_Tooltip" function="Floater.ToolbarToggle" - param="speak" + parameter="speak" /> <command name="upload" available_in_toybox="true" @@ -158,7 +158,7 @@ label_ref="Command_Upload_Label" tooltip_ref="Command_Upload_Tooltip" function="Floater.ToolbarToggle" - param="upload" + parameter="upload" /> <command name="view" available_in_toybox="true" @@ -166,6 +166,6 @@ label_ref="Command_View_Label" tooltip_ref="Command_View_Tooltip" function="Floater.ToolbarToggle" - param="view" + parameter="view" /> </commands> diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index beb928ea36..c3fa322f85 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -67,9 +67,6 @@ BOOL LLFloaterToybox::postBuild() if (command->availableInToybox()) { mToolBar->addCommand(command->id()); - - llassert(gToolBarView != NULL); - mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id())); } } @@ -93,17 +90,29 @@ void LLFloaterToybox::onClose(bool app_quitting) void LLFloaterToybox::draw() { + llassert(gToolBarView != NULL); + + LLCommandManager& cmdMgr = LLCommandManager::instance(); + + for (U32 i = 0; i < cmdMgr.commandCount(); i++) + { + LLCommand * command = cmdMgr.getCommand(i); + + if (command->availableInToybox()) + { + mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id())); + } + } + LLFloater::draw(); } void LLFloaterToybox::onFocusReceived() { - } void LLFloaterToybox::onBtnRestoreDefaults() { - } diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 092eddaa53..feb19571b2 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -59,7 +59,9 @@ read_only="true" right="-20" side="top" - top="85" /> + top="85"> + <button_panel background_visible="false" /> + </toolbar> <panel bevel_style="none" border="true" |