summaryrefslogtreecommitdiff
path: root/indra/newview/lljoystickbutton.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-11-19 11:43:47 +0800
committerangela <angela@lindenlab.com>2009-11-19 11:43:47 +0800
commit6e5f529a7adb53fa021986aed6e6b1b229cc0efd (patch)
treea031044cfb6618a5b36a0e80d0fc3a918dfa07a9 /indra/newview/lljoystickbutton.cpp
parenta35fbddb910fa0dd068622c3dc64af1b27ca19b7 (diff)
parent81eca4a7823f7fa06327b8185b6603d1f3c9ac9a (diff)
branch merge
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;
}