diff options
author | Leslie Linden <none@none> | 2011-06-07 13:57:19 -0700 |
---|---|---|
committer | Leslie Linden <none@none> | 2011-06-07 13:57:19 -0700 |
commit | 1aed9849285b574346087eb5ac7e0c8038fa21fe (patch) | |
tree | 63bed798da119dc094a360c88a02874a22d365d2 /indra/llui/llbadge.cpp | |
parent | 98bcd9e2efe4cc0dc5e51da09c6f18424b9d9144 (diff) |
EXP-865 PROGRESS -- Modify LLBadge to allow it to hang off of non-buttons
Added the following for increased LLBadge functionality:
* Panels now choose whether or not they accept buttons as children, which they
do by default.
* UI controls now shuffle controls with "requests_front" to the front of their
children list at postBuild time.
* Badges are set to "requests_front" by default
* Badges now accept border image and color attributes
Reviewed by Callum
Diffstat (limited to 'indra/llui/llbadge.cpp')
-rw-r--r-- | indra/llui/llbadge.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index ea934aa93b..e4c64e327e 100644 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -38,6 +38,8 @@ template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, LLBadge::Params::Params() : image("image") + , border_image("border_image") + , border_color("border_color") , image_color("image_color") , label("label") , label_color("label_color") @@ -57,6 +59,8 @@ bool LLBadge::Params::equals(const Params& a) const // skip owner in comparison on purpose + comp &= (border_image() == a.border_image()); + comp &= (border_color() == a.border_color()); comp &= (image() == a.image()); comp &= (image_color() == a.image_color()); comp &= (label() == a.label()); @@ -73,6 +77,8 @@ bool LLBadge::Params::equals(const Params& a) const LLBadge::LLBadge(const LLBadge::Params& p) : LLUICtrl(p) , mOwner(p.owner) + , mBorderImage(p.border_image) + , mBorderColor(p.border_color) , mGLFont(p.font) , mImage(p.image) , mImageColor(p.image_color) @@ -216,6 +222,11 @@ void LLBadge::draw() F32 badge_y = badge_center_y - badge_height * 0.5f; mImage->drawSolid(badge_x, badge_y, badge_width, badge_height, mImageColor % alpha); + + if (!mBorderImage.isNull()) + { + mBorderImage->drawSolid(badge_x, badge_y, badge_width, badge_height, mBorderColor % alpha); + } } else { |