summaryrefslogtreecommitdiff
path: root/indra/llui/lliconctrl.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-12-07 14:56:36 -0500
committerLoren Shih <seraph@lindenlab.com>2010-12-07 14:56:36 -0500
commit6a59861bde42e1b8ddc8c19a0b37a2b0a7011f7a (patch)
tree7a6d04e723a71c33205cdfa9815006d45310657c /indra/llui/lliconctrl.cpp
parent6a0c02c1b1e6ea3d84f06f2ab58402a98eece462 (diff)
parentd9b4570883652d647c05083c18fac1a088efd6e2 (diff)
Automated merge up from viewer-development
Diffstat (limited to 'indra/llui/lliconctrl.cpp')
-rw-r--r--indra/llui/lliconctrl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp
index 627957061d..47f2cfaf89 100644
--- a/indra/llui/lliconctrl.cpp
+++ b/indra/llui/lliconctrl.cpp
@@ -41,6 +41,7 @@ static LLDefaultChildRegistry::Register<LLIconCtrl> r("icon");
LLIconCtrl::Params::Params()
: image("image_name"),
color("color"),
+ use_draw_context_alpha("use_draw_context_alpha", true),
scale_image("scale_image")
{
tab_stop = false;
@@ -51,6 +52,7 @@ LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)
: LLUICtrl(p),
mColor(p.color()),
mImagep(p.image),
+ mUseDrawContextAlpha(p.use_draw_context_alpha),
mPriority(0),
mDrawWidth(0),
mDrawHeight(0)
@@ -71,7 +73,8 @@ void LLIconCtrl::draw()
{
if( mImagep.notNull() )
{
- mImagep->draw(getLocalRect(), mColor.get() % getDrawContext().mAlpha );
+ const F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency();
+ mImagep->draw(getLocalRect(), mColor.get() % alpha );
}
LLUICtrl::draw();