diff options
Diffstat (limited to 'linden/indra/newview/llstatusbar.cpp')
-rw-r--r-- | linden/indra/newview/llstatusbar.cpp | 41 |
1 files 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) | |||
173 | childSetVisible("search_editor", gSavedSettings.getBOOL("ShowSearchBar")); | 173 | childSetVisible("search_editor", gSavedSettings.getBOOL("ShowSearchBar")); |
174 | childSetVisible("search_btn", gSavedSettings.getBOOL("ShowSearchBar")); | 174 | childSetVisible("search_btn", gSavedSettings.getBOOL("ShowSearchBar")); |
175 | childSetVisible("menubar_search_bevel_bg", gSavedSettings.getBOOL("ShowSearchBar")); | 175 | childSetVisible("menubar_search_bevel_bg", gSavedSettings.getBOOL("ShowSearchBar")); |
176 | // Hide the buy currency button in non-Second Life grids -- MC | ||
177 | childSetVisible("buycurrency", gHippoGridManager->getConnectedGrid()->isSecondLife()); | ||
176 | 178 | ||
177 | childSetActionTextbox("ParcelNameText", onClickParcelInfo ); | 179 | childSetActionTextbox("ParcelNameText", onClickParcelInfo ); |
178 | childSetActionTextbox("BalanceText", onClickBalance ); | 180 | childSetActionTextbox("BalanceText", onClickBalance ); |
@@ -619,10 +621,27 @@ void LLStatusBar::refresh() | |||
619 | childSetRect("BalanceText", r); | 621 | childSetRect("BalanceText", r); |
620 | new_right -= r.getWidth() - 18; | 622 | new_right -= r.getWidth() - 18; |
621 | 623 | ||
622 | childGetRect("buycurrency", r); | 624 | // Don't toggle this visibility while in mouselook -- MC |
623 | r.translate( new_right - r.mRight, 0); | 625 | if (!gAgent.cameraMouselook()) |
624 | childSetRect("buycurrency", r); | 626 | { |
625 | new_right -= r.getWidth() + 6; | 627 | // Hide the buy currency button in non-Second Life grids -- MC |
628 | if (gHippoGridManager->getConnectedGrid()->isSecondLife()) | ||
629 | { | ||
630 | childGetRect("buycurrency", r); | ||
631 | r.translate( new_right - r.mRight, 0); | ||
632 | childSetRect("buycurrency", r); | ||
633 | new_right -= r.getWidth() + 6; | ||
634 | } | ||
635 | childSetVisible("buycurrency", gHippoGridManager->getConnectedGrid()->isSecondLife()); | ||
636 | |||
637 | // Set search bar visibility | ||
638 | childSetVisible("search_editor", search_visible); | ||
639 | childSetVisible("search_btn", search_visible); | ||
640 | childSetVisible("menubar_search_bevel_bg", search_visible); | ||
641 | mSGBandwidth->setVisible(! search_visible); | ||
642 | mSGPacketLoss->setVisible(! search_visible); | ||
643 | childSetEnabled("stat_btn", ! search_visible); | ||
644 | } | ||
626 | 645 | ||
627 | childGetRect("TimeText", r); | 646 | childGetRect("TimeText", r); |
628 | // mTextTime->getTextPixelWidth(); | 647 | // mTextTime->getTextPixelWidth(); |
@@ -637,23 +656,19 @@ void LLStatusBar::refresh() | |||
637 | const S32 PARCEL_RIGHT = llmin(mTextTime->getRect().mLeft, mTextParcelName->getTextPixelWidth() + x + 5); | 656 | const S32 PARCEL_RIGHT = llmin(mTextTime->getRect().mLeft, mTextParcelName->getTextPixelWidth() + x + 5); |
638 | r.set(x+4, getRect().getHeight() - 2, PARCEL_RIGHT, 0); | 657 | r.set(x+4, getRect().getHeight() - 2, PARCEL_RIGHT, 0); |
639 | mTextParcelName->setRect(r); | 658 | mTextParcelName->setRect(r); |
640 | |||
641 | // Set search bar visibility | ||
642 | childSetVisible("search_editor", search_visible); | ||
643 | childSetVisible("search_btn", search_visible); | ||
644 | childSetVisible("menubar_search_bevel_bg", search_visible); | ||
645 | mSGBandwidth->setVisible(! search_visible); | ||
646 | mSGPacketLoss->setVisible(! search_visible); | ||
647 | childSetEnabled("stat_btn", ! search_visible); | ||
648 | } | 659 | } |
649 | 660 | ||
650 | void LLStatusBar::setVisibleForMouselook(bool visible) | 661 | void LLStatusBar::setVisibleForMouselook(bool visible) |
651 | { | 662 | { |
652 | mTextBalance->setVisible(visible); | 663 | mTextBalance->setVisible(visible); |
653 | mTextTime->setVisible(visible); | 664 | mTextTime->setVisible(visible); |
654 | childSetVisible("buycurrency", visible); | 665 | if (gHippoGridManager->getConnectedGrid()->isSecondLife()) |
666 | { | ||
667 | childSetVisible("buycurrency", visible); | ||
668 | } | ||
655 | childSetVisible("search_editor", visible); | 669 | childSetVisible("search_editor", visible); |
656 | childSetVisible("search_btn", visible); | 670 | childSetVisible("search_btn", visible); |
671 | childSetVisible("menubar_search_bevel_bg", visible); | ||
657 | mSGBandwidth->setVisible(visible); | 672 | mSGBandwidth->setVisible(visible); |
658 | mSGPacketLoss->setVisible(visible); | 673 | mSGPacketLoss->setVisible(visible); |
659 | setBackgroundVisible(visible); | 674 | setBackgroundVisible(visible); |