aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llscrollbar.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:54 -0500
committerJacek Antonelli2008-08-15 23:44:54 -0500
commitb2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch)
tree3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/llui/llscrollbar.cpp
parentSecond Life viewer sources 1.14.0.1 (diff)
downloadmeta-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/llscrollbar.cpp')
-rw-r--r--linden/indra/llui/llscrollbar.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/linden/indra/llui/llscrollbar.cpp b/linden/indra/llui/llscrollbar.cpp
index 578fdb1..4edf81e 100644
--- a/linden/indra/llui/llscrollbar.cpp
+++ b/linden/indra/llui/llscrollbar.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-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
@@ -233,7 +234,7 @@ BOOL LLScrollbar::handleMouseDown(S32 x, S32 y, MASK mask)
233 { 234 {
234 // Start dragging the thumb 235 // Start dragging the thumb
235 // No handler needed for focus lost since this clas has no state that depends on it. 236 // No handler needed for focus lost since this clas has no state that depends on it.
236 gFocusMgr.setMouseCapture( this, NULL ); 237 gFocusMgr.setMouseCapture( this );
237 mDragStartX = x; 238 mDragStartX = x;
238 mDragStartY = y; 239 mDragStartY = y;
239 mOrigRect.mTop = mThumbRect.mTop; 240 mOrigRect.mTop = mThumbRect.mTop;
@@ -274,7 +275,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
274 // because they'll capture the mouse whenever they need hover events. 275 // because they'll capture the mouse whenever they need hover events.
275 276
276 BOOL handled = FALSE; 277 BOOL handled = FALSE;
277 if( gFocusMgr.getMouseCapture() == this ) 278 if( hasMouseCapture() )
278 { 279 {
279 S32 height = mRect.getHeight(); 280 S32 height = mRect.getHeight();
280 S32 width = mRect.getWidth(); 281 S32 width = mRect.getWidth();
@@ -427,9 +428,9 @@ BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
427BOOL LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask) 428BOOL LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask)
428{ 429{
429 BOOL handled = FALSE; 430 BOOL handled = FALSE;
430 if( gFocusMgr.getMouseCapture() == this ) 431 if( hasMouseCapture() )
431 { 432 {
432 gFocusMgr.setMouseCapture( NULL, NULL ); 433 gFocusMgr.setMouseCapture( NULL );
433 handled = TRUE; 434 handled = TRUE;
434 } 435 }
435 else 436 else
@@ -461,7 +462,7 @@ void LLScrollbar::draw()
461 462
462 screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &local_mouse_x, &local_mouse_y); 463 screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &local_mouse_x, &local_mouse_y);
463 BOOL other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this; 464 BOOL other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this;
464 BOOL hovered = mEnabled && !other_captor && (gFocusMgr.getMouseCapture() == this || mThumbRect.pointInRect(local_mouse_x, local_mouse_y)); 465 BOOL hovered = mEnabled && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y));
465 if (hovered) 466 if (hovered)
466 { 467 {
467 mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f)); 468 mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f));