diff options
Diffstat (limited to 'indra/newview/llfloaterbuyland.cpp')
-rw-r--r-- | indra/newview/llfloaterbuyland.cpp | 24 |
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"); |