summaryrefslogtreecommitdiff
path: root/indra/newview/lljoystickbutton.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-19 13:36:27 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-19 13:36:27 -0500
commitafbc78d0398d58c44b2b1fb692ce1a27577fc4b1 (patch)
treeda4c6c1bd6e87b81b10a5b7bed6429373e6a89eb /indra/newview/lljoystickbutton.cpp
parent6cea252986ef6d33f2e37333a286362b8e0272c5 (diff)
parent3e46ee6274d04d91657da92953b167fe94eb7f59 (diff)
Merging viewer-2-0 changes into avatar-pipeline branch
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/lljoystickbutton.cpp')
-rw-r--r--indra/newview/lljoystickbutton.cpp6
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;
}