From 2cb8d8b5d1e30c62f6f4abff2435ff74bd684cae Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 26 Apr 2010 23:33:54 -0700 Subject: Hide the buy currency button in non-Second Life grids --- linden/indra/newview/llstatusbar.cpp | 41 ++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index 5434c20..6a9e0fc 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp @@ -173,6 +173,8 @@ mSquareMetersCommitted(0) childSetVisible("search_editor", gSavedSettings.getBOOL("ShowSearchBar")); childSetVisible("search_btn", gSavedSettings.getBOOL("ShowSearchBar")); childSetVisible("menubar_search_bevel_bg", gSavedSettings.getBOOL("ShowSearchBar")); + // Hide the buy currency button in non-Second Life grids -- MC + childSetVisible("buycurrency", gHippoGridManager->getConnectedGrid()->isSecondLife()); childSetActionTextbox("ParcelNameText", onClickParcelInfo ); childSetActionTextbox("BalanceText", onClickBalance ); @@ -619,10 +621,27 @@ void LLStatusBar::refresh() childSetRect("BalanceText", r); new_right -= r.getWidth() - 18; - childGetRect("buycurrency", r); - r.translate( new_right - r.mRight, 0); - childSetRect("buycurrency", r); - new_right -= r.getWidth() + 6; + // Don't toggle this visibility while in mouselook -- MC + if (!gAgent.cameraMouselook()) + { + // Hide the buy currency button in non-Second Life grids -- MC + if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + { + childGetRect("buycurrency", r); + r.translate( new_right - r.mRight, 0); + childSetRect("buycurrency", r); + new_right -= r.getWidth() + 6; + } + childSetVisible("buycurrency", gHippoGridManager->getConnectedGrid()->isSecondLife()); + + // Set search bar visibility + childSetVisible("search_editor", search_visible); + childSetVisible("search_btn", search_visible); + childSetVisible("menubar_search_bevel_bg", search_visible); + mSGBandwidth->setVisible(! search_visible); + mSGPacketLoss->setVisible(! search_visible); + childSetEnabled("stat_btn", ! search_visible); + } childGetRect("TimeText", r); // mTextTime->getTextPixelWidth(); @@ -637,23 +656,19 @@ void LLStatusBar::refresh() const S32 PARCEL_RIGHT = llmin(mTextTime->getRect().mLeft, mTextParcelName->getTextPixelWidth() + x + 5); r.set(x+4, getRect().getHeight() - 2, PARCEL_RIGHT, 0); mTextParcelName->setRect(r); - - // Set search bar visibility - childSetVisible("search_editor", search_visible); - childSetVisible("search_btn", search_visible); - childSetVisible("menubar_search_bevel_bg", search_visible); - mSGBandwidth->setVisible(! search_visible); - mSGPacketLoss->setVisible(! search_visible); - childSetEnabled("stat_btn", ! search_visible); } void LLStatusBar::setVisibleForMouselook(bool visible) { mTextBalance->setVisible(visible); mTextTime->setVisible(visible); - childSetVisible("buycurrency", visible); + if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + { + childSetVisible("buycurrency", visible); + } childSetVisible("search_editor", visible); childSetVisible("search_btn", visible); + childSetVisible("menubar_search_bevel_bg", visible); mSGBandwidth->setVisible(visible); mSGPacketLoss->setVisible(visible); setBackgroundVisible(visible); -- cgit v1.1