From 1a512488fada8f0ed21c52b249229fba84ebb69f Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 31 Oct 2012 14:32:24 +0800 Subject: [PATCH] fixed #1538: Logic error in CCControlHuePicker::checkSliderPosition. The distance between current location and center should compare with radius rather than dimension. --- extensions/GUI/CCControlExtension/CCControlHuePicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/GUI/CCControlExtension/CCControlHuePicker.cpp b/extensions/GUI/CCControlExtension/CCControlHuePicker.cpp index 54b9b643fa..846762ab07 100644 --- a/extensions/GUI/CCControlExtension/CCControlHuePicker.cpp +++ b/extensions/GUI/CCControlExtension/CCControlHuePicker.cpp @@ -162,7 +162,7 @@ bool CCControlHuePicker::checkSliderPosition(CCPoint location) double distance = sqrt(pow (location.x + 10, 2) + pow(location.y, 2)); // check that the touch location is within the circle - if (160 > distance && distance > 118) + if (80 > distance && distance > 59) { updateSliderPosition(location); return true;