From e1aaaa34e45daca5a39a040865938cb3e2404f3e Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Tue, 17 Nov 2009 13:40:09 +0200 Subject: Minor style changes for EXT-1014 (Unable to move undocked camera controls bar) fix. --HG-- branch : product-engine --- indra/newview/lljoystickbutton.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/lljoystickbutton.cpp') 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"<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; } -- cgit v1.2.3