summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbuyland.cpp
diff options
context:
space:
mode:
authorPalmer Truelson <palmer@lindenlab.com>2010-02-23 17:19:58 -0800
committerPalmer Truelson <palmer@lindenlab.com>2010-02-23 17:19:58 -0800
commit54a95f706fe42cbef272c53e3fadfc2cf7ecfd0f (patch)
treed9b1f05ce695fa3ef5ee41949d3799d4e9a3e050 /indra/newview/llfloaterbuyland.cpp
parent7885748497d8b95f51c65f7f84a40d1405429616 (diff)
parent0980df1e0ce99bdafdd4e806cbacad96c71729cc (diff)
merge
Diffstat (limited to 'indra/newview/llfloaterbuyland.cpp')
-rw-r--r--indra/newview/llfloaterbuyland.cpp24
1 files changed, 23 insertions, 1 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");