aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-05-12 05:24:29 -0700
committerJacek Antonelli2010-06-19 02:05:25 -0500
commit2c77f8d61876b9d36ad63620da0bf34bcd428450 (patch)
treee471f949dd7999722c1314e2873a050bae834f8c /linden/indra/newview/llstatusbar.cpp
parentChanged water preset loading from LL_INFOS to LL_DEBUGS to reduce log spam (diff)
downloadmeta-impy-2c77f8d61876b9d36ad63620da0bf34bcd428450.zip
meta-impy-2c77f8d61876b9d36ad63620da0bf34bcd428450.tar.gz
meta-impy-2c77f8d61876b9d36ad63620da0bf34bcd428450.tar.bz2
meta-impy-2c77f8d61876b9d36ad63620da0bf34bcd428450.tar.xz
Added brandable buy currency button in the status bar (#273). Effectively reverts ad408085 and 2cb8d8b5
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llstatusbar.cpp44
1 files changed, 16 insertions, 28 deletions
diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp
index bdc04d6..558cf42 100644
--- a/linden/indra/newview/llstatusbar.cpp
+++ b/linden/indra/newview/llstatusbar.cpp
@@ -173,22 +173,14 @@ mSquareMetersCommitted(0)
173 childSetVisible("search_btn", gSavedSettings.getBOOL("ShowSearchBar")); 173 childSetVisible("search_btn", gSavedSettings.getBOOL("ShowSearchBar"));
174 childSetVisible("menubar_search_bevel_bg", gSavedSettings.getBOOL("ShowSearchBar")); 174 childSetVisible("menubar_search_bevel_bg", gSavedSettings.getBOOL("ShowSearchBar"));
175 175
176 childSetAction("buycurrency", onClickBuyCurrency, this );
177 childSetActionTextbox("BalanceText", onClickBalance );
176 childSetActionTextbox("ParcelNameText", onClickParcelInfo ); 178 childSetActionTextbox("ParcelNameText", onClickParcelInfo );
177 179
178 // Disable buying currency when connected to non-SL grids. 180 // TODO: Disable buying currency when connected to non-SL grids
179 // TODO: Check whether the grid supports buying currency. 181 // that don't support currency yet -- MC
180 if( gHippoGridManager->getConnectedGrid()->isSecondLife() ) 182 LLButton* buybtn = getChild<LLButton>("buycurrency");
181 { 183 buybtn->setLabelArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
182 childSetEnabled("buycurrency", true);
183 childSetVisible("buycurrency", true);
184 childSetAction("buycurrency", onClickBuyCurrency, this );
185 childSetActionTextbox("BalanceText", onClickBalance );
186 }
187 else
188 {
189 childSetEnabled("buycurrency", false);
190 childSetVisible("buycurrency", false);
191 }
192 184
193 // Adding Net Stat Graph 185 // Adding Net Stat Graph
194 S32 x = getRect().getWidth() - 2; 186 S32 x = getRect().getWidth() - 2;
@@ -462,6 +454,9 @@ void LLStatusBar::refresh()
462 x += buttonRect.getWidth(); 454 x += buttonRect.getWidth();
463 } 455 }
464 456
457 // TODO: disable buy land button when connected to non-SL grids
458 // that don't support currency.
459 // TODO: make this brandable -- MC
465 BOOL canBuyLand = parcel 460 BOOL canBuyLand = parcel
466 && !parcel->isPublic() 461 && !parcel->isPublic()
467 && LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, false); 462 && LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, false);
@@ -632,19 +627,14 @@ void LLStatusBar::refresh()
632 childSetRect("BalanceText", r); 627 childSetRect("BalanceText", r);
633 new_right -= r.getWidth() - 18; 628 new_right -= r.getWidth() - 18;
634 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 // Don't toggle this visibility while in mouselook -- MC 635 // Don't toggle this visibility while in mouselook -- MC
636 if (!gAgent.cameraMouselook()) 636 if (!gAgent.cameraMouselook())
637 { 637 {
638 // Hide the buy currency button in non-Second Life grids -- MC
639 if (gHippoGridManager->getConnectedGrid()->isSecondLife())
640 {
641 childGetRect("buycurrency", r);
642 r.translate( new_right - r.mRight, 0);
643 childSetRect("buycurrency", r);
644 new_right -= r.getWidth() + 6;
645 }
646 childSetVisible("buycurrency", gHippoGridManager->getConnectedGrid()->isSecondLife());
647
648 // Set search bar visibility 638 // Set search bar visibility
649 childSetVisible("search_editor", search_visible); 639 childSetVisible("search_editor", search_visible);
650 childSetVisible("search_btn", search_visible); 640 childSetVisible("search_btn", search_visible);
@@ -673,10 +663,8 @@ void LLStatusBar::setVisibleForMouselook(bool visible)
673{ 663{
674 mTextBalance->setVisible(visible); 664 mTextBalance->setVisible(visible);
675 mTextTime->setVisible(visible); 665 mTextTime->setVisible(visible);
676 if (gHippoGridManager->getConnectedGrid()->isSecondLife()) 666 childSetVisible("buycurrency", visible);
677 { 667 childSetVisible("buyland", visible);
678 childSetVisible("buycurrency", visible);
679 }
680 childSetVisible("search_editor", visible); 668 childSetVisible("search_editor", visible);
681 childSetVisible("search_btn", visible); 669 childSetVisible("search_btn", visible);
682 childSetVisible("menubar_search_bevel_bg", visible); 670 childSetVisible("menubar_search_bevel_bg", visible);