diff options
Diffstat (limited to 'linden/indra/llui/llresizehandle.cpp')
-rw-r--r-- | linden/indra/llui/llresizehandle.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/linden/indra/llui/llresizehandle.cpp b/linden/indra/llui/llresizehandle.cpp index d3e066b..3aa968f 100644 --- a/linden/indra/llui/llresizehandle.cpp +++ b/linden/indra/llui/llresizehandle.cpp | |||
@@ -59,8 +59,7 @@ LLResizeHandle::LLResizeHandle( const LLString& name, const LLRect& rect, S32 mi | |||
59 | 59 | ||
60 | if( RIGHT_BOTTOM == mCorner) | 60 | if( RIGHT_BOTTOM == mCorner) |
61 | { | 61 | { |
62 | LLUUID image_id(LLUI::sConfigGroup->getString("UIImgResizeBottomRightUUID")); | 62 | mImage = LLUI::sImageProvider->getUIImage("UIImgResizeBottomRightUUID"); |
63 | mImage = LLUI::sImageProvider->getImageByID(image_id); | ||
64 | } | 63 | } |
65 | 64 | ||
66 | switch( mCorner ) | 65 | switch( mCorner ) |
@@ -78,19 +77,16 @@ LLResizeHandle::LLResizeHandle( const LLString& name, const LLRect& rect, S32 mi | |||
78 | BOOL LLResizeHandle::handleMouseDown(S32 x, S32 y, MASK mask) | 77 | BOOL LLResizeHandle::handleMouseDown(S32 x, S32 y, MASK mask) |
79 | { | 78 | { |
80 | BOOL handled = FALSE; | 79 | BOOL handled = FALSE; |
81 | if( getVisible() && pointInHandle(x, y) ) | 80 | if( pointInHandle(x, y) ) |
82 | { | 81 | { |
83 | handled = TRUE; | 82 | handled = TRUE; |
84 | if( getEnabled() ) | 83 | // Route future Mouse messages here preemptively. (Release on mouse up.) |
85 | { | 84 | // No handler needed for focus lost since this clas has no state that depends on it. |
86 | // Route future Mouse messages here preemptively. (Release on mouse up.) | 85 | gFocusMgr.setMouseCapture( this ); |
87 | // No handler needed for focus lost since this clas has no state that depends on it. | ||
88 | gFocusMgr.setMouseCapture( this ); | ||
89 | 86 | ||
90 | localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY); | 87 | localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY); |
91 | mLastMouseScreenX = mDragLastScreenX; | 88 | mLastMouseScreenX = mDragLastScreenX; |
92 | mLastMouseScreenY = mDragLastScreenY; | 89 | mLastMouseScreenY = mDragLastScreenY; |
93 | } | ||
94 | } | 90 | } |
95 | 91 | ||
96 | return handled; | 92 | return handled; |
@@ -107,8 +103,7 @@ BOOL LLResizeHandle::handleMouseUp(S32 x, S32 y, MASK mask) | |||
107 | gFocusMgr.setMouseCapture( NULL ); | 103 | gFocusMgr.setMouseCapture( NULL ); |
108 | handled = TRUE; | 104 | handled = TRUE; |
109 | } | 105 | } |
110 | else | 106 | else if( pointInHandle(x, y) ) |
111 | if( getVisible() && pointInHandle(x, y) ) | ||
112 | { | 107 | { |
113 | handled = TRUE; | 108 | handled = TRUE; |
114 | } | 109 | } |
@@ -284,7 +279,7 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) | |||
284 | } | 279 | } |
285 | else // don't have mouse capture | 280 | else // don't have mouse capture |
286 | { | 281 | { |
287 | if( getVisible() && pointInHandle( x, y ) ) | 282 | if( pointInHandle( x, y ) ) |
288 | { | 283 | { |
289 | handled = TRUE; | 284 | handled = TRUE; |
290 | } | 285 | } |
@@ -314,7 +309,7 @@ void LLResizeHandle::draw() | |||
314 | { | 309 | { |
315 | if( mImage.notNull() && getVisible() && (RIGHT_BOTTOM == mCorner) ) | 310 | if( mImage.notNull() && getVisible() && (RIGHT_BOTTOM == mCorner) ) |
316 | { | 311 | { |
317 | gl_draw_image( 0, 0, mImage ); | 312 | mImage->draw(0, 0); |
318 | } | 313 | } |
319 | } | 314 | } |
320 | 315 | ||