diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-26 16:52:32 +0300 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-26 16:52:32 +0300 |
| commit | 19fb0a16695b57e70dc371471d37c16929f1c424 (patch) | |
| tree | 39f16d806b66e3795ded41c1462e205404996046 /indra/llui/llbutton.cpp | |
| parent | 8e56f063924601041bac3791e794fa6934f20936 (diff) | |
| parent | 1a8d917a6d0d2393a0f0248d0072dd7cfd487609 (diff) | |
Manual merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llbutton.cpp')
| -rw-r--r-- | indra/llui/llbutton.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index ac5651e4b6..f0f34ebd4f 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -114,6 +114,7 @@ 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), @@ -498,7 +499,11 @@ 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) @@ -506,6 +511,7 @@ void LLButton::onMouseLeave(S32 x, S32 y, MASK mask) LLUICtrl::onMouseLeave(x, y, mask); mNeedsHighlight = FALSE; + mMouseOver = true; } void LLButton::setHighlight(bool b) @@ -559,14 +565,10 @@ 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() && pointInView(local_mouse_x, local_mouse_y)) + || (hasMouseCapture() && mMouseOver) || mForcePressedState; bool selected = getToggleState(); |
