diff options
author | Richard Linden <none@none> | 2010-09-09 17:19:33 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-09-09 17:19:33 -0700 |
commit | 6c2c87e8b96edf0b5c222b355b39915827ec7fda (patch) | |
tree | 2b20dcfa2f1ad12672e29c00770fb59e87ece3e2 /indra/llui | |
parent | 9f75ae5e327c2802a901b1afd6ce3deb77212181 (diff) | |
parent | 30f2987b0a2d4a0586ed8893a43d97274bd29500 (diff) |
Merge
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llbutton.cpp | 12 | ||||
-rw-r--r-- | indra/llui/llbutton.h | 1 |
2 files changed, 5 insertions, 8 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index f0f34ebd4f..40520c1b79 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -114,7 +114,6 @@ LLButton::LLButton(const LLButton::Params& p) mFlashing( FALSE ), mCurGlowStrength(0.f), mNeedsHighlight(FALSE), - mMouseOver(false), mUnselectedLabel(p.label()), mSelectedLabel(p.label_selected()), mGLFont(p.font), @@ -499,19 +498,14 @@ void LLButton::onMouseEnter(S32 x, S32 y, MASK mask) LLUICtrl::onMouseEnter(x, y, mask); if (isInEnabledChain()) - { mNeedsHighlight = TRUE; } - mMouseOver = true; -} - void LLButton::onMouseLeave(S32 x, S32 y, MASK mask) { LLUICtrl::onMouseLeave(x, y, mask); mNeedsHighlight = FALSE; - mMouseOver = true; } void LLButton::setHighlight(bool b) @@ -565,10 +559,14 @@ void LLButton::draw() } // Unselected image assignments + S32 local_mouse_x; + S32 local_mouse_y; + LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y); + bool enabled = isInEnabledChain(); bool pressed = pressed_by_keyboard - || (hasMouseCapture() && mMouseOver) + || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)) || mForcePressedState; bool selected = getToggleState(); diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index d87ceb7c42..2d5fefa78c 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -350,7 +350,6 @@ private: BOOL mCommitOnReturn; BOOL mFadeWhenDisabled; bool mForcePressedState; - bool mMouseOver; LLFrameTimer mFlashingTimer; }; |