diff --git a/dotscape b/dotscape index 2571476..d562414 100755 Binary files a/dotscape and b/dotscape differ diff --git a/functional-core/app-update.sml b/functional-core/app-update.sml index 57701cf..0717610 100644 --- a/functional-core/app-update.sml +++ b/functional-core/app-update.sml @@ -82,6 +82,14 @@ struct ] local + (* + * Range to detect from clickable position. + * For example, if we have a clickable position at (x, y) = (500, 500), + * with a range of 15, we can detect clicks targeting this position + * from top left at (485, 485) to bottom right at (515, 515). + * *) + val range = 15.0 + fun getVerticalClickPos ( yClickPoints , idx @@ -100,7 +108,7 @@ struct let val curVerticalPos = Vector.sub (yClickPoints, idx) in - if mouseY < curVerticalPos - 7.0 orelse mouseY > curVerticalPos + 7.0 then + if mouseY < curVerticalPos - range orelse mouseY > curVerticalPos + range then getVerticalClickPos ( yClickPoints , idx + 1 @@ -205,7 +213,7 @@ struct let val curPos = Vector.sub (xClickPoints, idx) in - if mouseX < curPos - 7.0 orelse mouseX > curPos + 7.0 then + if mouseX < curPos - range orelse mouseX > curPos + range then getHorizontalClickPos ( xClickPoints , yClickPoints