diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-18 10:43:30 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-18 10:43:30 +0000 |
commit | 22aa5eed910bbd1b366789cb96247899c744df75 (patch) | |
tree | 40bf09c7239e6983b3eb279695b9f662ce4d4d0e /indra/newview/lljoystickbutton.cpp | |
parent | 939e48d38cf9f15e1f7220cc3860810badd8a778 (diff) | |
parent | 125b779fb63cafe4e5df4d601542def1b4bc05f3 (diff) |
merge.
Diffstat (limited to 'indra/newview/lljoystickbutton.cpp')
-rw-r--r-- | indra/newview/lljoystickbutton.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index 0acc67ff5a..2cc5c8335d 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -136,13 +136,13 @@ void LLJoystick::updateSlop() bool LLJoystick::pointInCircle(S32 x, S32 y) const { - if(this->getLocalRect().mTop!=this->getLocalRect().mRight) + if(this->getLocalRect().getHeight() != this->getLocalRect().getWidth()) { llwarns << "Joystick shape is not square"<<llendl; - return TRUE; + return true; } //center is x and y coordinates of center of joystick circle, and also its radius - int center = this->getLocalRect().mTop/2; + int center = this->getLocalRect().getHeight()/2; bool in_circle = (x - center) * (x - center) + (y - center) * (y - center) <= center * center; return in_circle; } |