summaryrefslogtreecommitdiff
path: root/indra/newview/llbottomtray.h
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-05-14 17:15:28 +0300
committerMike Antipov <mantipov@productengine.com>2010-05-14 17:15:28 +0300
commit4b9b5c1d38a234d4127c2c38df5f6f1f902190b2 (patch)
tree6c820e14886ba807d97b46a82abd49d4a7fe4c64 /indra/newview/llbottomtray.h
parent5088d01be115f4f9ded71da2313ee08af01f6616 (diff)
EXT-7104 WIP added 4 buttons to bottom tray, added "Show button" menu support.
* Added 4 buttons with tooltips: ** Build - Shows/hides Build Tools ** Search - Shows/hides Search ** Map - Shows/hides World Map ** Mini-Map - Shows/hides Mini-Map * Made their width and minimal width the same as "Move" and "View" buttons (increased default total width of the bottom tray to make Layout Stack initialize its panels with default values from xml) * Added appropriate menu items in context menu to Show these buttons in the bottom tray (with functionality) * Set on click actions for this buttons. ("Build" temporary made disabled because default toggle registration is not enough for this floater.) Dev Notes: * Improved LLBottomTray::initResizeStateContainers to fill mObjectDefaultWidthMap using mStateProcessedObjectMap & mButtonsProcessOrder container * Improved LLBottomTray::canButtonBeShown to process variable number of buttons that can be hidden on resize QA Notes: Resize behavior with new buttons can already be tested. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/381/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llbottomtray.h')
-rw-r--r--indra/newview/llbottomtray.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index e9d59e82ba..5588aefb42 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -120,12 +120,24 @@ private:
, RS_BUTTON_SPEAK = 0x0040
, RS_IM_WELL = 0x0080
, RS_NOTIFICATION_WELL = 0x0100
+ , RS_BUTTON_BUILD = 0x0200
+ , RS_BUTTON_SEARCH = 0x0400
+ , RS_BUTTON_WORLD_MAP = 0x0800
+ , RS_BUTTON_MINI_MAP = 0x1000
+
+ /*
+ Once new button that can be hidden on resize is added don't forget to update related places:
+ - RS_BUTTONS_CAN_BE_HIDDEN enum value below.
+ - initResizeStateContainers(): mStateProcessedObjectMap and mButtonsProcessOrder
+ */
/**
* Specifies buttons which can be hidden when bottom tray is shrunk.
* They are: Gestures, Movement (Move), Camera (View), Snapshot
+ * new: Build, Search, Map, World Map, Mini-Map.
*/
, RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES
+ | RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP
}EResizeState;
/**
@@ -272,6 +284,28 @@ private:
void initResizeStateContainers();
/**
+ * Initializes buttons' visibility depend on stored Control Settings.
+ */
+ void initButtonsVisibility();
+
+ /**
+ * Initializes listeners of Control Settings to toggle appropriate buttons' visibility.
+ *
+ * @see toggleShowButton()
+ */
+ void setButtonsControlsAndListeners();
+
+ /**
+ * Toggles visibility of specified button depend on passed value.
+ *
+ * @param button_type - type of button to be toggled
+ * @param new_visibility - new visibility of the button
+ *
+ * @see setButtonsControlsAndListeners()
+ */
+ static bool toggleShowButton(EResizeState button_type, const LLSD& new_visibility);
+
+ /**
* Sets passed visibility to object specified by resize type.
*/
void setTrayButtonVisible(EResizeState shown_object_type, bool visible);