diff options
author | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
commit | b2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch) | |
tree | 3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/llui/llslider.cpp | |
parent | Second Life viewer sources 1.14.0.1 (diff) | |
download | meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2 meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz |
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/llui/llslider.cpp')
-rw-r--r-- | linden/indra/llui/llslider.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/linden/indra/llui/llslider.cpp b/linden/indra/llui/llslider.cpp index 20d77bf..8c0d2a1 100644 --- a/linden/indra/llui/llslider.cpp +++ b/linden/indra/llui/llslider.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 5 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -117,7 +118,7 @@ F32 LLSlider::getValueF32() const | |||
117 | 118 | ||
118 | BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask) | 119 | BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask) |
119 | { | 120 | { |
120 | if( gFocusMgr.getMouseCapture() == this ) | 121 | if( hasMouseCapture() ) |
121 | { | 122 | { |
122 | S32 left_edge = THUMB_WIDTH/2; | 123 | S32 left_edge = THUMB_WIDTH/2; |
123 | S32 right_edge = mRect.getWidth() - (THUMB_WIDTH/2); | 124 | S32 right_edge = mRect.getWidth() - (THUMB_WIDTH/2); |
@@ -144,9 +145,9 @@ BOOL LLSlider::handleMouseUp(S32 x, S32 y, MASK mask) | |||
144 | { | 145 | { |
145 | BOOL handled = FALSE; | 146 | BOOL handled = FALSE; |
146 | 147 | ||
147 | if( gFocusMgr.getMouseCapture() == this ) | 148 | if( hasMouseCapture() ) |
148 | { | 149 | { |
149 | gFocusMgr.setMouseCapture( NULL, NULL ); | 150 | gFocusMgr.setMouseCapture( NULL ); |
150 | 151 | ||
151 | if( mMouseUpCallback ) | 152 | if( mMouseUpCallback ) |
152 | { | 153 | { |
@@ -194,7 +195,7 @@ BOOL LLSlider::handleMouseDown(S32 x, S32 y, MASK mask) | |||
194 | 195 | ||
195 | // Start dragging the thumb | 196 | // Start dragging the thumb |
196 | // No handler needed for focus lost since this class has no state that depends on it. | 197 | // No handler needed for focus lost since this class has no state that depends on it. |
197 | gFocusMgr.setMouseCapture( this, NULL ); | 198 | gFocusMgr.setMouseCapture( this ); |
198 | mDragStartThumbRect = mThumbRect; | 199 | mDragStartThumbRect = mThumbRect; |
199 | } | 200 | } |
200 | make_ui_sound("UISndClick"); | 201 | make_ui_sound("UISndClick"); |
@@ -261,12 +262,12 @@ void LLSlider::draw() | |||
261 | if (!thumb_imagep) | 262 | if (!thumb_imagep) |
262 | { | 263 | { |
263 | gl_rect_2d(mThumbRect, mThumbCenterColor, TRUE); | 264 | gl_rect_2d(mThumbRect, mThumbCenterColor, TRUE); |
264 | if (gFocusMgr.getMouseCapture() == this) | 265 | if (hasMouseCapture()) |
265 | { | 266 | { |
266 | gl_rect_2d(mDragStartThumbRect, mThumbCenterColor % opacity, FALSE); | 267 | gl_rect_2d(mDragStartThumbRect, mThumbCenterColor % opacity, FALSE); |
267 | } | 268 | } |
268 | } | 269 | } |
269 | else if( gFocusMgr.getMouseCapture() == this ) | 270 | else if( hasMouseCapture() ) |
270 | { | 271 | { |
271 | gl_draw_scaled_image_with_border(mDragStartThumbRect.mLeft, mDragStartThumbRect.mBottom, 16, 16, mDragStartThumbRect.getWidth(), mDragStartThumbRect.getHeight(), | 272 | gl_draw_scaled_image_with_border(mDragStartThumbRect.mLeft, mDragStartThumbRect.mBottom, 16, 16, mDragStartThumbRect.getWidth(), mDragStartThumbRect.getHeight(), |
272 | thumb_imagep, mThumbCenterColor % 0.3f, TRUE); | 273 | thumb_imagep, mThumbCenterColor % 0.3f, TRUE); |