aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
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
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 'linden')
-rw-r--r--linden/indra/newview/llstatusbar.cpp44
-rw-r--r--linden/indra/newview/skins/default/textures/textures.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_status_bar.xml10
3 files changed, 21 insertions, 35 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);
diff --git a/linden/indra/newview/skins/default/textures/textures.xml b/linden/indra/newview/skins/default/textures/textures.xml
index 0a3aee7..611ad46 100644
--- a/linden/indra/newview/skins/default/textures/textures.xml
+++ b/linden/indra/newview/skins/default/textures/textures.xml
@@ -204,8 +204,6 @@
204 204
205 <texture name="status_no_build.tga"/> 205 <texture name="status_no_build.tga"/>
206 <texture name="status_voice.tga"/> 206 <texture name="status_voice.tga"/>
207 <texture name="status_buy_currency.tga"/>
208 <texture name="status_buy_currency_pressed.tga"/>
209 <texture name="status_buy_land.tga"/> 207 <texture name="status_buy_land.tga"/>
210 <texture name="status_buy_land_pressed.tga"/> 208 <texture name="status_buy_land_pressed.tga"/>
211 <texture name="status_no_fly.tga"/> 209 <texture name="status_no_fly.tga"/>
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_status_bar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_status_bar.xml
index 63d2ca3..5a40a3d 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_status_bar.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_status_bar.xml
@@ -20,12 +20,12 @@
20 v_pad="2" width="76"> 20 v_pad="2" width="76">
21 Loading... 21 Loading...
22 </text> 22 </text>
23 <button bottom="-17" enabled="true" follows="right|bottom" font="SansSerif" 23 <button bottom="-18" enabled="true" follows="right|bottom" font="SansSerifSmall"
24 halign="center" height="16" 24 halign="center" height="18"
25 image_selected="status_buy_currency_pressed.tga" 25 image_selected="button_enabled_selected_32x128.tga"
26 image_unselected="status_buy_currency.tga" label="" label_selected="" 26 image_unselected="button_enabled_32x128.tga" label="[CURRENCY]"
27 left="-210" mouse_opaque="true" name="buycurrency" scale_image="true" 27 left="-210" mouse_opaque="true" name="buycurrency" scale_image="true"
28 tool_tip="Buy currency" width="16" /> 28 tool_tip="Buy currency" width="36" />
29 <text type="string" length="12" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 29 <text type="string" length="12" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
30 bottom="-20" disabled_color="TimeTextColor" drop_shadow_visible="true" 30 bottom="-20" disabled_color="TimeTextColor" drop_shadow_visible="true"
31 enabled="true" follows="right|bottom" font="SansSerifSmall" h_pad="0" 31 enabled="true" follows="right|bottom" font="SansSerifSmall" h_pad="0"