Fix up handling of home / places / profile bottomtray buttons

master
Arrehn 2011-08-11 21:01:18 -04:00
parent 7930251bb7
commit a7d82cfd0e
3 changed files with 123 additions and 115 deletions

View File

@ -1750,9 +1750,9 @@ void LLBottomTray::initResizeStateContainers()
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild<LLPanel>("search_btn_panel")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild<LLPanel>("world_map_btn_panel")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MINI_MAP, getChild<LLPanel>("mini_map_btn_panel")));
// AO mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_HOME, getChild<LLPanel>("bottom_sbhome")));
// AO mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_ME, getChild<LLPanel>("bottom_sbme")));
// AO mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PLACES, getChild<LLPanel>("bottom_sbplaces")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_HOME, getChild<LLPanel>("bottom_sbhome")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_ME, getChild<LLPanel>("bottom_sbme")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PLACES, getChild<LLPanel>("bottom_sbplaces")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_APPEARANCE, getChild<LLPanel>("bottom_sbappearance")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_INVENTORY, getChild<LLPanel>("bottom_sbinv")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_AO, getChild<LLPanel>("ao_btn_panel"))); // ## Zi: Animation Overrider
@ -1769,16 +1769,16 @@ void LLBottomTray::initResizeStateContainers()
mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES);
mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT);
mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA);
// mButtonsProcessOrder.push_back(RS_BUTTON_AVATARS);
mButtonsProcessOrder.push_back(RS_BUTTON_AVATARS);
mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT);
mButtonsProcessOrder.push_back(RS_BUTTON_PEOPLE);
mButtonsProcessOrder.push_back(RS_BUTTON_BUILD);
mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH);
mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP);
mButtonsProcessOrder.push_back(RS_BUTTON_MINI_MAP);
//AO mButtonsProcessOrder.push_back(RS_BUTTON_HOME);
//AO mButtonsProcessOrder.push_back(RS_BUTTON_ME);
//AO mButtonsProcessOrder.push_back(RS_BUTTON_PLACES);
mButtonsProcessOrder.push_back(RS_BUTTON_HOME);
mButtonsProcessOrder.push_back(RS_BUTTON_ME);
mButtonsProcessOrder.push_back(RS_BUTTON_PLACES);
mButtonsProcessOrder.push_back(RS_BUTTON_APPEARANCE);
mButtonsProcessOrder.push_back(RS_BUTTON_INVENTORY);
mButtonsProcessOrder.push_back(RS_BUTTON_AO); // ## Zi: Animation Overrider
@ -1834,9 +1834,9 @@ void LLBottomTray::initButtonsVisibility()
setVisibleAndFitWidths(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton"));
setVisibleAndFitWidths(RS_BUTTON_MINI_MAP, gSavedSettings.getBOOL("ShowMiniMapButton"));
//AO setVisibleAndFitWidths(RS_BUTTON_HOME, gSavedSettings.getBOOL("ShowHomeButton"));
//AO setVisibleAndFitWidths(RS_BUTTON_ME, gSavedSettings.getBOOL("ShowMeButton"));
//AO setVisibleAndFitWidths(RS_BUTTON_PLACES, gSavedSettings.getBOOL("ShowPlacesButton"));
setVisibleAndFitWidths(RS_BUTTON_HOME, gSavedSettings.getBOOL("ShowHomeButton"));
setVisibleAndFitWidths(RS_BUTTON_ME, gSavedSettings.getBOOL("ShowMeButton"));
setVisibleAndFitWidths(RS_BUTTON_PLACES, gSavedSettings.getBOOL("ShowPlacesButton"));
setVisibleAndFitWidths(RS_BUTTON_AO, gSavedSettings.getBOOL("ShowAOButton")); // ## Zi: Animation Overrider
setVisibleAndFitWidths(RS_BUTTON_QUICKPREFS, gSavedSettings.getBOOL("ShowQuickPrefsButton")); // Quick Preferences panel -WoLf
// take care of additional sidebar button visibility -Zi
@ -1865,9 +1865,9 @@ void LLBottomTray::setButtonsControlsAndListeners()
gSavedSettings.getControl("ShowSearchButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SEARCH, _2));
gSavedSettings.getControl("ShowWorldMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_WORLD_MAP, _2));
gSavedSettings.getControl("ShowMiniMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MINI_MAP, _2));
// gSavedSettings.getControl("ShowHomeButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_HOME, _2));
// gSavedSettings.getControl("ShowMeButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_ME, _2));
// gSavedSettings.getControl("ShowPlacesButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_PLACES, _2));
gSavedSettings.getControl("ShowHomeButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_HOME, _2));
gSavedSettings.getControl("ShowMeButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_ME, _2));
gSavedSettings.getControl("ShowPlacesButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_PLACES, _2));
gSavedSettings.getControl("ShowAOButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_AO, _2)); // ## Zi: Animation Overrider
gSavedSettings.getControl("ShowQuickPrefsButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_QUICKPREFS, _2)); // Quick Preferences panel -WoLf
// take care of additional sidebar button visibility -Zi
@ -2205,9 +2205,13 @@ std::string LLBottomTray::resizeStateToString(EResizeState state)
case RS_BUTTON_HOWTO: rs_string = "RS_BUTTON_HOWTO"; break;
case RS_BUTTON_SPLITTER_1: rs_string = "RS_BUTTON_SPLITTER_1"; break;
//<AO>
case RS_BUTTON_APPEARANCE: rs_string = "RS_BUTTON_APPEARANCE"; break;
case RS_BUTTON_INVENTORY: rs_string = "RS_BUTTON_INVENTORY"; break;
case RS_BUTTON_QUICKPREFS: rs_string = "RS_BUTTON_QUICKPREFS"; break;
case RS_BUTTON_APPEARANCE: rs_string = "RS_BUTTON_APPEARANCE"; break;
case RS_BUTTON_INVENTORY: rs_string = "RS_BUTTON_INVENTORY"; break;
case RS_BUTTON_PLACES: rs_string = "RS_BUTTON_PLACES"; break;
case RS_BUTTON_AO: rs_string = "RS_BUTTON_AO"; break;
case RS_BUTTON_QUICKPREFS: rs_string = "RS_BUTTON_QUICKPREFS"; break;
case RS_BUTTON_HOME: rs_string = "RS_BUTTON_HOME"; break;
case RS_BUTTON_ME: rs_string = "RS_BUTTON_ME"; break;
//</AO>
case RS_BUTTON_SPLITTER_2: rs_string = "RS_BUTTON_SPLITTER_2"; break;
case RS_BUTTONS_CAN_BE_HIDDEN: rs_string = "RS_BUTTONS_CAN_BE_HIDDEN"; break;

View File

@ -152,6 +152,7 @@ public:
private:
typedef enum e_resize_state
{
// LL Stock buttons
RS_NORESIZE = 0x0000,
RS_CHICLET_PANEL = 0x0001,
RS_CHATBAR_INPUT = 0x0002,
@ -173,12 +174,15 @@ private:
RS_BUTTON_HOWTO = 0x20000,
RS_BUTTON_SPLITTER_1 = 0x40000,
RS_BUTTON_SPLITTER_2 = 0x80000,
//-TT 2.6.9 - changed values to let the defaults be same as LL
RS_BUTTON_AO = 0x10000, // ## Zi: Animation Overrider
// sidebar buttons -Zi
// FS Buttons
RS_BUTTON_AO = 0x100000, // ## Zi: Animation Overrider
RS_BUTTON_APPEARANCE = 0x200000,
RS_BUTTON_INVENTORY = 0x400000,
RS_BUTTON_QUICKPREFS = 0x800000, // Quick Preferences panel -WoLf
RS_BUTTON_PLACES = 0x1000000,
RS_BUTTON_HOME = 0x2000000,
RS_BUTTON_ME = 0x4000000,
/*
Once new button that can be hidden on resize is added don't forget to update related places:
@ -193,9 +197,10 @@ private:
*/
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
| RS_BUTTON_AO // ## Zi: Animation Overrider
| RS_BUTTON_PEOPLE | RS_BUTTON_APPEARANCE | RS_BUTTON_INVENTORY // more sidebar buttons -Zi
| RS_BUTTON_QUICKPREFS // Quick Preferences panel -WoLf
| RS_BUTTON_DESTINATIONS | RS_BUTTON_AVATARS
| RS_BUTTON_PROFILE | RS_BUTTON_HOWTO | RS_BUTTON_PEOPLE | RS_BUTTON_APPEARANCE
| RS_BUTTON_INVENTORY | RS_BUTTON_PLACES | RS_BUTTON_HOME | RS_BUTTON_ME
// AO: Removed AO and QUickprefs from the "can be hidden" list, due to the strong number of use cases for these, even in very small screens
}EResizeState;

View File

@ -269,7 +269,6 @@
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
@ -425,6 +424,98 @@
parameter="mini_map" />
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
min_height="28"
min_width="40"
mouse_opaque="false"
name="bottom_sbplaces"
user_resize="false"
width="40">
<bottomtray_button
follows="left|right"
height="23"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
is_toggle="false"
image_overlay="TabIcon_Places_Selected"
layout="topleft"
left="0"
name="sidebar_places_btn"
tool_tip="Shows/hides places panel"
top="5"
enabled="true"
use_ellipses="true"
width="36">
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
min_height="28"
min_width="40"
mouse_opaque="false"
name="search_btn_panel"
user_resize="false"
width="40">
<bottomtray_button
follows="left|right"
height="23"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
is_toggle="true"
image_overlay="search_18"
layout="topleft"
left="0"
name="search_btn"
tool_tip="Shows/hides Search"
top="5"
use_ellipses="true"
width="36">
<init_callback
function="Button.SetFloaterToggle"
parameter="search" />
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
min_height="28"
min_width="40"
mouse_opaque="false"
name="bottom_sbhome"
user_resize="false"
width="40">
<bottomtray_button
follows="left|right"
height="23"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
is_toggle="false"
image_overlay="TabIcon_Home_Selected"
layout="topleft"
left="0"
name="sidebar_home_btn"
tool_tip="Shows/hides sidebar home"
top="5"
enabled="true"
use_ellipses="true"
width="36">
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
@ -568,98 +659,6 @@
</layout_panel>
<!-- Quick Preferences panel -WoLf -->
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
min_height="28"
min_width="40"
mouse_opaque="false"
name="search_btn_panel"
user_resize="false"
width="40">
<bottomtray_button
follows="left|right"
height="23"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
is_toggle="true"
image_overlay="search_18"
layout="topleft"
left="0"
name="search_btn"
tool_tip="Shows/hides Search"
top="5"
use_ellipses="true"
width="36">
<init_callback
function="Button.SetFloaterToggle"
parameter="search" />
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
min_height="28"
min_width="40"
mouse_opaque="false"
name="bottom_sbhome"
user_resize="false"
width="40">
<bottomtray_button
follows="left|right"
height="23"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
is_toggle="false"
image_overlay="TabIcon_Home_Selected"
layout="topleft"
left="0"
name="sidebar_home_btn"
tool_tip="Shows/hides sidebar home"
top="5"
enabled="true"
use_ellipses="true"
width="36">
</bottomtray_button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
min_height="28"
min_width="40"
mouse_opaque="false"
name="bottom_sbplaces"
user_resize="false"
width="40">
<bottomtray_button
follows="left|right"
height="23"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
is_toggle="false"
image_overlay="TabIcon_Places_Selected"
layout="topleft"
left="0"
name="sidebar_places_btn"
tool_tip="Shows/hides places panel"
top="5"
enabled="true"
use_ellipses="true"
width="36">
</bottomtray_button>
</layout_panel>
<layout_panel
follows="left|right"
height="30"