summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbuyland.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-18 15:28:09 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-18 15:28:09 +0000
commit2d1c918837cdc5a948619ac2b483d1719aac4069 (patch)
tree7e0b4842a2f55cadd4cc44cb3d95d9581c2e5716 /indra/newview/llfloaterbuyland.cpp
parent161aff8e86ae690e6ba4124c9433bfed5025b133 (diff)
parentfa03910a34e5c32149793605bc481de00ada5e1c (diff)
viewer2 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");