summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbuyland.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-02-22 14:15:58 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-02-22 14:15:58 -0500
commitbd84d36c9d08878c895c896e097e8e3310b61cf3 (patch)
treee2e333ba15c131dfb25c4baf54bcb98fd2a3bd46 /indra/newview/llfloaterbuyland.cpp
parent00fdc0acd5e27d353c070706e838a35bf889a536 (diff)
parent04712617c55c53dbec1f73a4e8834ebe3167e5ed (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");