summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-02-17 20:25:37 +0200
committerSergei Litovchuk <slitovchuk@productengine.com>2010-02-17 20:25:37 +0200
commitba398107212865fa232a128e4136d579b30cef50 (patch)
treea253b636e1b5269b7b63ee0b0435efcd39e9c1a8
parentf52e7036940a015a405ae94aa016612c4160df9e (diff)
Implemented (EXT-4714) Add maturity icons to Buy Land and Buy Land for Group.
--HG-- branch : product-engine
-rw-r--r--indra/newview/llfloaterbuyland.cpp24
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_land.xml19
2 files changed, 41 insertions, 2 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 9b88923e7e..d37bc01885 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -82,7 +82,10 @@ public:
virtual ~LLFloaterBuyLandUI();
/*virtual*/ void onClose(bool app_quitting);
-
+
+ // Left padding for maturity rating icon.
+ static const S32 ICON_PAD = 2;
+
private:
class SelectionObserver : public LLParcelObserver
{
@@ -501,6 +504,25 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
{
std::string region_name_txt = region->getName() + " ("+rating +")";
region_name->setText(region_name_txt);
+
+ LLIconCtrl* rating_icon = getChild<LLIconCtrl>("rating_icon");
+ LLRect rect = rating_icon->getRect();
+ S32 icon_left_pad = region_name->getRect().mLeft + region_name->getTextBoundingRect().getWidth() + ICON_PAD;
+ rating_icon->setRect(rect.setOriginAndSize(icon_left_pad, rect.mBottom, rect.getWidth(), rect.getHeight()));
+
+ switch(sim_access)
+ {
+ case SIM_ACCESS_PG:
+ rating_icon->setValue(getString("icon_PG"));
+ break;
+
+ case SIM_ACCESS_ADULT:
+ rating_icon->setValue(getString("icon_R"));
+ break;
+
+ default:
+ rating_icon->setValue(getString("icon_M"));
+ }
}
LLTextBox* region_type = getChild<LLTextBox>("region_type_text");
diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml
index 6e0c3dfe54..98508e5113 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml
@@ -172,6 +172,15 @@ supports [AMOUNT2] objects
name="no_parcel_selected">
(no parcel selected)
</floater.string>
+ <floater.string
+ name="icon_PG"
+ value="Parcel_PG_Dark"/>
+ <floater.string
+ name="icon_M"
+ value="Parcel_M_Dark"/>
+ <floater.string
+ name="icon_R"
+ value="Parcel_R_Dark"/>
<text
type="string"
length="1"
@@ -195,9 +204,17 @@ supports [AMOUNT2] objects
left_delta="110"
name="region_name_text"
top_delta="0"
- width="175">
+ use_ellipses="true"
+ width="155">
(unknown)
</text>
+ <icon
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="rating_icon"
+ top_delta="-2"
+ width="18"/>
<text
type="string"
length="1"