diff options
author | McCabe Maxsted | 2009-06-08 09:24:40 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-06-08 09:24:40 -0700 |
commit | 9e4c01fb00bdcd12b64564b81e556620112743da (patch) | |
tree | fbbdd3254683a76172d7e26a1571941801859ac7 /linden/indra/newview | |
parent | Merged in 1.2.0-stopallanims (diff) | |
parent | Backported L$/sq meter info from 1.23 (diff) | |
download | meta-impy-9e4c01fb00bdcd12b64564b81e556620112743da.zip meta-impy-9e4c01fb00bdcd12b64564b81e556620112743da.tar.gz meta-impy-9e4c01fb00bdcd12b64564b81e556620112743da.tar.bz2 meta-impy-9e4c01fb00bdcd12b64564b81e556620112743da.tar.xz |
Merged in 1.2.0-landsqm
Diffstat (limited to 'linden/indra/newview')
4 files changed, 58 insertions, 30 deletions
diff --git a/linden/indra/newview/llfloaterbuyland.cpp b/linden/indra/newview/llfloaterbuyland.cpp index 1ad45e1..f2a9fe2 100644 --- a/linden/indra/newview/llfloaterbuyland.cpp +++ b/linden/indra/newview/llfloaterbuyland.cpp | |||
@@ -1020,14 +1020,24 @@ void LLFloaterBuyLandUI::refreshUI() | |||
1020 | 1020 | ||
1021 | childSetText("info_size", getString("meters_supports_object", string_args)); | 1021 | childSetText("info_size", getString("meters_supports_object", string_args)); |
1022 | 1022 | ||
1023 | F32 cost_per_sqm = 0.0f; | ||
1024 | if (mParcelActualArea > 0) | ||
1025 | { | ||
1026 | cost_per_sqm = (F32)mParcelPrice / (F32)mParcelActualArea; | ||
1027 | } | ||
1023 | 1028 | ||
1024 | childSetText("info_price", | 1029 | LLStringUtil::format_map_t info_price_args; |
1025 | llformat( | 1030 | info_price_args["[PRICE]"] = llformat("%d", mParcelPrice); |
1026 | "L$ %d%s", | 1031 | info_price_args["[PRICE_PER_SQM]"] = llformat("%.1f", cost_per_sqm); |
1027 | mParcelPrice, | 1032 | if (mParcelSoldWithObjects) |
1028 | mParcelSoldWithObjects | 1033 | { |
1029 | ? "\nsold with objects" | 1034 | info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_with_objects"); |
1030 | : "")); | 1035 | } |
1036 | else | ||
1037 | { | ||
1038 | info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_without_objects"); | ||
1039 | } | ||
1040 | childSetText("info_price", getString("info_price_string", info_price_args)); | ||
1031 | childSetVisible("info_price", mParcelIsForSale); | 1041 | childSetVisible("info_price", mParcelIsForSale); |
1032 | } | 1042 | } |
1033 | else | 1043 | else |
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp index e1d08da..9707184 100644 --- a/linden/indra/newview/llfloaterland.cpp +++ b/linden/indra/newview/llfloaterland.cpp | |||
@@ -604,6 +604,25 @@ void LLPanelLandGeneral::refresh() | |||
604 | mBtnSellLand->setVisible(FALSE); | 604 | mBtnSellLand->setVisible(FALSE); |
605 | mBtnStopSellLand->setVisible(FALSE); | 605 | mBtnStopSellLand->setVisible(FALSE); |
606 | 606 | ||
607 | // show pricing information | ||
608 | S32 area; | ||
609 | S32 claim_price; | ||
610 | S32 rent_price; | ||
611 | F32 dwell; | ||
612 | LLViewerParcelMgr::getInstance()->getDisplayInfo(&area, | ||
613 | &claim_price, | ||
614 | &rent_price, | ||
615 | &for_sale, | ||
616 | &dwell); | ||
617 | |||
618 | // Area | ||
619 | LLUIString price = getString("area_size_text"); | ||
620 | price.setArg("[AREA]", llformat("%d",area)); | ||
621 | mTextPriceLabel->setText(getString("area_text")); | ||
622 | mTextPrice->setText(price.getString()); | ||
623 | |||
624 | mTextDwell->setText(llformat("%.0f", dwell)); | ||
625 | |||
607 | if (for_sale) | 626 | if (for_sale) |
608 | { | 627 | { |
609 | mSaleInfoForSale1->setVisible(TRUE); | 628 | mSaleInfoForSale1->setVisible(TRUE); |
@@ -619,7 +638,15 @@ void LLPanelLandGeneral::refresh() | |||
619 | mSaleInfoForSaleNoObjects->setVisible(TRUE); | 638 | mSaleInfoForSaleNoObjects->setVisible(TRUE); |
620 | } | 639 | } |
621 | mSaleInfoNotForSale->setVisible(FALSE); | 640 | mSaleInfoNotForSale->setVisible(FALSE); |
641 | |||
642 | F32 cost_per_sqm = 0.0f; | ||
643 | if (area > 0) | ||
644 | { | ||
645 | cost_per_sqm = (F32)parcel->getSalePrice() / (F32)area; | ||
646 | } | ||
647 | |||
622 | mSaleInfoForSale1->setTextArg("[PRICE]", llformat("%d", parcel->getSalePrice())); | 648 | mSaleInfoForSale1->setTextArg("[PRICE]", llformat("%d", parcel->getSalePrice())); |
649 | mSaleInfoForSale1->setTextArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm)); | ||
623 | if (can_be_sold) | 650 | if (can_be_sold) |
624 | { | 651 | { |
625 | mBtnStopSellLand->setVisible(TRUE); | 652 | mBtnStopSellLand->setVisible(TRUE); |
@@ -645,25 +672,6 @@ void LLPanelLandGeneral::refresh() | |||
645 | mBtnBuyGroupLand->setEnabled( | 672 | mBtnBuyGroupLand->setEnabled( |
646 | LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true)); | 673 | LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true)); |
647 | 674 | ||
648 | // show pricing information | ||
649 | S32 area; | ||
650 | S32 claim_price; | ||
651 | S32 rent_price; | ||
652 | F32 dwell; | ||
653 | LLViewerParcelMgr::getInstance()->getDisplayInfo(&area, | ||
654 | &claim_price, | ||
655 | &rent_price, | ||
656 | &for_sale, | ||
657 | &dwell); | ||
658 | |||
659 | // Area | ||
660 | LLUIString price = getString("area_size_text"); | ||
661 | price.setArg("[AREA]", llformat("%d",area)); | ||
662 | mTextPriceLabel->setText(getString("area_text")); | ||
663 | mTextPrice->setText(price.getString()); | ||
664 | |||
665 | mTextDwell->setText(llformat("%.0f", dwell)); | ||
666 | |||
667 | if(region_owner) | 675 | if(region_owner) |
668 | { | 676 | { |
669 | mBtnReclaimLand->setEnabled( | 677 | mBtnReclaimLand->setEnabled( |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml b/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml index 87aea05..7668609 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml | |||
@@ -93,8 +93,8 @@ | |||
93 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 93 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
94 | bottom="-180" drop_shadow_visible="true" enabled="true" follows="left|top" | 94 | bottom="-180" drop_shadow_visible="true" enabled="true" follows="left|top" |
95 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="76" | 95 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="76" |
96 | mouse_opaque="true" name="For Sale: Price L$[PRICE]." v_pad="0" width="206"> | 96 | mouse_opaque="true" name="For Sale: Price L$[PRICE]." v_pad="0" width="246"> |
97 | Price: L$[PRICE]. | 97 | Price: L$[PRICE] (L$[PRICE_PER_SQM]/sq.m.). |
98 | </text> | 98 | </text> |
99 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 99 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
100 | bottom="-200" drop_shadow_visible="true" enabled="false" follows="left|top" | 100 | bottom="-200" drop_shadow_visible="true" enabled="false" follows="left|top" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml b/linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml index a7fd3ed..a0c82f9 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml | |||
@@ -86,13 +86,15 @@ | |||
86 | </text> | 86 | </text> |
87 | <text bottom_delta="-5" follows="top|left" font="SansSerif" height="16" left_delta="50" | 87 | <text bottom_delta="-5" follows="top|left" font="SansSerif" height="16" left_delta="50" |
88 | name="info_price" right="400" > | 88 | name="info_price" right="400" > |
89 | L$ 1500, objects included | 89 | L$ 1500 |
90 | (L$ 1.1/sq.m.) | ||
91 | sold with objects | ||
90 | </text> | 92 | </text> |
91 | <text bottom="-180" follows="top|left" font="SansSerifHuge" height="24" left="16" | 93 | <text bottom="-180" follows="top|left" font="SansSerifHuge" height="24" left="16" |
92 | name="info_action" width="200"> | 94 | name="info_action" width="200"> |
93 | Buying this land will: | 95 | Buying this land will: |
94 | </text> | 96 | </text> |
95 | <pad height="10" /> | 97 | <pad height="6" /> |
96 | <icon follows="top|left" height="64" image_name="badge_note.j2c" left="0" | 98 | <icon follows="top|left" height="64" image_name="badge_note.j2c" left="0" |
97 | name="step_error" width="64" /> | 99 | name="step_error" width="64" /> |
98 | <text bottom_delta="-110" follows="top|left" height="160" left="72" | 100 | <text bottom_delta="-110" follows="top|left" height="160" left="72" |
@@ -267,6 +269,14 @@ supports [AMOUNT2] objects | |||
267 | <string name="sold_with_objects"> | 269 | <string name="sold_with_objects"> |
268 | sold with objects | 270 | sold with objects |
269 | </string> | 271 | </string> |
272 | <string name="sold_without_objects"> | ||
273 | objects not included | ||
274 | </string> | ||
275 | <string name="info_price_string"> | ||
276 | L$ [PRICE] | ||
277 | (L$ [PRICE_PER_SQM]/sq.m.) | ||
278 | [SOLD_WITH_OBJECTS] | ||
279 | </string> | ||
270 | <string name="insufficient_land_credits"> | 280 | <string name="insufficient_land_credits"> |
271 | The group [GROUP] will need sufficient contributed land use | 281 | The group [GROUP] will need sufficient contributed land use |
272 | credits to cover this parcel before the purchase will | 282 | credits to cover this parcel before the purchase will |