diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-08-11 06:37:35 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-08-11 06:37:35 +0000 |
commit | caa367e5d435a70647c56460741a52b14f41ec9e (patch) | |
tree | b82b02000ede0bb1784ee17a018132bd2308d88a /indra/llui/llslider.cpp | |
parent | 0984822b3ebd85e84b3c017c082d859134801ecd (diff) |
svn merge -r 129543-130091 skinning-19 -> viewer-2.0.0-3
EXT-172 - adding non-unicode support for group name line_editor
EXT-310 text was squished, moved things around so there was was more space between text blocks.
EXT-313 "me" panel
EXT-314 changed out arrow character for arrow art, added arrow art to textures.xml
EXT-315 replaced word "mute" with "block"
EXT-322 moved Use Chat Bubbles text box from _chat.xml to _advanced.xml
EXT-323 killed some two items
EXT-324 and EXT-322 removed small avatar names checkbox and added show chat bubbled checkbox
EXT-330 Sidetray filter - text overlaps search icon inside textbox
EXT-261 I18N: Labels in /character/avatar_lad.xml are not localizable
EXT-392 Rearranged floater_inventory_items_properties.xml to match spec
DEV-35897 Filters in sidebar remain active even after user has changed/closed tab
DEV-36886 I18N: hardcoded currency format in panel_status_bar.xml/status/buycurrency
DEV-36987 - Pressed states needed for widgets
DEV-36795 Remove slurl tooltip from navigation bar location box
DEV-37184 Move "Block List" out of topmenu and make a button in Prefs > Privacy
Diffstat (limited to 'indra/llui/llslider.cpp')
-rw-r--r-- | indra/llui/llslider.cpp | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp index f167836bee..1c394a71dd 100644 --- a/indra/llui/llslider.cpp +++ b/indra/llui/llslider.cpp @@ -49,6 +49,8 @@ LLSlider::Params::Params() thumb_outline_color("thumb_outline_color"), thumb_center_color("thumb_center_color"), thumb_image("thumb_image"), + thumb_image_pressed("thumb_image_pressed"), + thumb_image_disabled("thumb_image_disabled"), track_image("track_image"), track_highlight_image("track_highlight_image"), mouse_down_callback("mouse_down_callback"), @@ -64,6 +66,8 @@ LLSlider::LLSlider(const LLSlider::Params& p) mThumbOutlineColor(p.thumb_outline_color()), mThumbCenterColor(p.thumb_center_color()), mThumbImage(p.thumb_image), + mThumbImagePressed(p.thumb_image_pressed), + mThumbImageDisabled(p.thumb_image_disabled), mTrackImage(p.track_image), mTrackHighlightImage(p.track_highlight_image) { @@ -243,10 +247,6 @@ void LLSlider::draw() // drawing solids requires texturing be disabled gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - F32 opacity = getEnabled() ? 1.f : 0.3f; - LLColor4 center_color = (mThumbCenterColor.get() % opacity); - LLColor4 track_color = (mTrackColor.get() % opacity); - // Track LLRect track_rect(mThumbImage->getWidth() / 2, getLocalRect().getCenterY() + (mTrackImage->getHeight() / 2), @@ -257,18 +257,38 @@ void LLSlider::draw() mTrackHighlightImage->draw(highlight_rect); // Thumb - if( hasMouseCapture() ) - { - // Show ghost where thumb was before dragging began. - mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f); - } if (hasFocus()) { // Draw focus highlighting. mThumbImage->drawBorder(mThumbRect, gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); } - // Fill in the thumb. - mThumbImage->draw(mThumbRect, hasMouseCapture() ? mThumbOutlineColor.get() : center_color); + if( hasMouseCapture() ) // currently clicking on slider + { + // Show ghost where thumb was before dragging began. + if (mThumbImage.notNull()) + { + mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f); + } + if (mThumbImagePressed.notNull()) + { + mThumbImagePressed->draw(mThumbRect, mThumbOutlineColor); + } + } + else if (!isInEnabledChain()) + { + if (mThumbImageDisabled.notNull()) + { + mThumbImageDisabled->draw(mThumbRect, mThumbCenterColor); + } + } + else + { + if (mThumbImage.notNull()) + { + mThumbImage->draw(mThumbRect, mThumbCenterColor); + } + } + LLUICtrl::draw(); } |