summaryrefslogtreecommitdiff
path: root/indra/llui/llslider.cpp
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-09-09 01:26:44 +0000
committerRichard Nelson <richard@lindenlab.com>2009-09-09 01:26:44 +0000
commit58bce2d205bee3f5adb33b15efe73098e77429eb (patch)
treed591209e661af81fce315ceadc1179d277c579d8 /indra/llui/llslider.cpp
parenta67d2dd1a4c490eae337ae930eac98c714033711 (diff)
merge -r132032-132812 svn+ssh://svn.lindenlab.com/svn/linden/branches/gooey/gooey-1
Diffstat (limited to 'indra/llui/llslider.cpp')
-rw-r--r--indra/llui/llslider.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index 1c394a71dd..07b6895378 100644
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -239,6 +239,8 @@ BOOL LLSlider::handleKeyHere(KEY key, MASK mask)
void LLSlider::draw()
{
+ F32 alpha = getDrawContext().mAlpha;
+
// since thumb image might still be decoding, need thumb to accomodate image size
updateThumbRect();
@@ -253,14 +255,14 @@ void LLSlider::draw()
getRect().getWidth() - mThumbImage->getWidth() / 2,
getLocalRect().getCenterY() - (mTrackImage->getHeight() / 2) );
LLRect highlight_rect(track_rect.mLeft, track_rect.mTop, mThumbRect.getCenterX(), track_rect.mBottom);
- mTrackImage->draw(track_rect);
- mTrackHighlightImage->draw(highlight_rect);
+ mTrackImage->draw(track_rect, LLColor4::white % alpha);
+ mTrackHighlightImage->draw(highlight_rect, LLColor4::white % alpha);
// Thumb
if (hasFocus())
{
// Draw focus highlighting.
- mThumbImage->drawBorder(mThumbRect, gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth());
+ mThumbImage->drawBorder(mThumbRect, gFocusMgr.getFocusColor() % alpha, gFocusMgr.getFocusFlashWidth());
}
if( hasMouseCapture() ) // currently clicking on slider
@@ -268,25 +270,25 @@ void LLSlider::draw()
// Show ghost where thumb was before dragging began.
if (mThumbImage.notNull())
{
- mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f);
+ mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % (0.3f * alpha));
}
if (mThumbImagePressed.notNull())
{
- mThumbImagePressed->draw(mThumbRect, mThumbOutlineColor);
+ mThumbImagePressed->draw(mThumbRect, mThumbOutlineColor % alpha);
}
}
else if (!isInEnabledChain())
{
if (mThumbImageDisabled.notNull())
{
- mThumbImageDisabled->draw(mThumbRect, mThumbCenterColor);
+ mThumbImageDisabled->draw(mThumbRect, mThumbCenterColor % alpha);
}
}
else
{
if (mThumbImage.notNull())
{
- mThumbImage->draw(mThumbRect, mThumbCenterColor);
+ mThumbImage->draw(mThumbRect, mThumbCenterColor % alpha);
}
}