modify ClickPoints.getClickPos function to detect click for square/pixel, not for triangle. (Checking if mouse is between two click points instead of if mouse is around one click point.)
This commit is contained in:
@@ -170,6 +170,17 @@ struct
|
||||
CollisionTree.toTriangles (windowWidth, windowHeight, squares, maxSide)
|
||||
val drawMsg = DRAW_SQUARES_AND_DOTS {squares = squares, dots = dotVec}
|
||||
in
|
||||
(model, drawMsg)
|
||||
(model, [drawMsg])
|
||||
end
|
||||
|
||||
fun mouseLeftClick model =
|
||||
case ClickPoints.getClickPositionFromMouse model of
|
||||
SOME (hIdx, vIdx) => addCoordinates (model, hIdx, vIdx)
|
||||
| NONE => (model, [])
|
||||
|
||||
fun enterOrSpaceCoordinates model =
|
||||
let val {arrowX, arrowY, ...} = model
|
||||
in addCoordinates (model, arrowX, arrowY)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user