summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2010-11-25 23:26:55 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2010-11-25 23:26:55 +0200
commit393514f3dc35e005d7359acaa79cb36ea19b7d59 (patch)
treee6f6238c256db1e6af02604bb1b92510abb9408c /indra/newview
parentd1549c18b0d126ae3fcc28449901a90214111676 (diff)
STORM-677 FIXED Made texture picker control transparent if the floater it resides in is transparent.
Also added transparency support to the texture picker floater.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltexturectrl.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 328298bda4..759f68b321 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -564,25 +564,26 @@ void LLFloaterTexturePicker::draw()
LLRect interior = border;
interior.stretch( -1 );
+ const F32 alpha = mCurrentTransparency; // mCurrentTransparency gets updated in LLFloater::draw()
if( mTexturep )
{
if( mTexturep->getComponents() == 4 )
{
- gl_rect_2d_checkerboard( interior );
+ gl_rect_2d_checkerboard( interior, alpha );
}
- gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep );
+ gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha );
// Pump the priority
mTexturep->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
}
else if (!mFallbackImage.isNull())
{
- mFallbackImage->draw(interior);
+ mFallbackImage->draw(interior, UI_VERTEX_COLOR % alpha);
}
else
{
- gl_rect_2d( interior, LLColor4::grey, TRUE );
+ gl_rect_2d( interior, LLColor4::grey % alpha, TRUE );
// Draw X
gl_draw_x(interior, LLColor4::black );
@@ -1263,23 +1264,24 @@ void LLTextureCtrl::draw()
LLRect interior = border;
interior.stretch( -1 );
+ const F32 alpha = getCurrentTransparency();
if( mTexturep )
{
if( mTexturep->getComponents() == 4 )
{
- gl_rect_2d_checkerboard( interior );
+ gl_rect_2d_checkerboard( interior, alpha );
}
- gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep);
+ gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha);
mTexturep->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
}
else if (!mFallbackImage.isNull())
{
- mFallbackImage->draw(interior);
+ mFallbackImage->draw(interior, UI_VERTEX_COLOR % alpha);
}
else
{
- gl_rect_2d( interior, LLColor4::grey, TRUE );
+ gl_rect_2d( interior, LLColor4::grey % alpha, TRUE );
// Draw X
gl_draw_x( interior, LLColor4::black );