diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2010-12-10 13:20:10 -0800 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2010-12-10 13:20:10 -0800 |
commit | 647fe8fb13c02854349fda2113bc9b1902ceca10 (patch) | |
tree | 662e864d65fe3e0bed4615706121cc8a38e2e8c5 /indra/llui/lliconctrl.cpp | |
parent | 1924f1bbca437eac4ca5d047c489042e65904d2e (diff) | |
parent | 426744df2c9a6c04bab594fefbd8b35970d0948d (diff) |
Merge
Diffstat (limited to 'indra/llui/lliconctrl.cpp')
-rw-r--r-- | indra/llui/lliconctrl.cpp | 5 |
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(); |