From b2afb8800bb033a04bb3ecdf0363068d56648ef1 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:54 -0500 Subject: Second Life viewer sources 1.15.0.2 --- linden/indra/llui/llslider.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'linden/indra/llui/llslider.cpp') 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 @@ * * Copyright (c) 2002-2007, Linden Research, Inc. * + * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 * ("GPL"), unless you have obtained a separate licensing agreement @@ -117,7 +118,7 @@ F32 LLSlider::getValueF32() const BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask) { - if( gFocusMgr.getMouseCapture() == this ) + if( hasMouseCapture() ) { S32 left_edge = THUMB_WIDTH/2; S32 right_edge = mRect.getWidth() - (THUMB_WIDTH/2); @@ -144,9 +145,9 @@ BOOL LLSlider::handleMouseUp(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; - if( gFocusMgr.getMouseCapture() == this ) + if( hasMouseCapture() ) { - gFocusMgr.setMouseCapture( NULL, NULL ); + gFocusMgr.setMouseCapture( NULL ); if( mMouseUpCallback ) { @@ -194,7 +195,7 @@ BOOL LLSlider::handleMouseDown(S32 x, S32 y, MASK mask) // Start dragging the thumb // No handler needed for focus lost since this class has no state that depends on it. - gFocusMgr.setMouseCapture( this, NULL ); + gFocusMgr.setMouseCapture( this ); mDragStartThumbRect = mThumbRect; } make_ui_sound("UISndClick"); @@ -261,12 +262,12 @@ void LLSlider::draw() if (!thumb_imagep) { gl_rect_2d(mThumbRect, mThumbCenterColor, TRUE); - if (gFocusMgr.getMouseCapture() == this) + if (hasMouseCapture()) { gl_rect_2d(mDragStartThumbRect, mThumbCenterColor % opacity, FALSE); } } - else if( gFocusMgr.getMouseCapture() == this ) + else if( hasMouseCapture() ) { gl_draw_scaled_image_with_border(mDragStartThumbRect.mLeft, mDragStartThumbRect.mBottom, 16, 16, mDragStartThumbRect.getWidth(), mDragStartThumbRect.getHeight(), thumb_imagep, mThumbCenterColor % 0.3f, TRUE); -- cgit v1.1