use a triple check, first whether the cursor is in a large circle, then whether the cursor is in a small circle, and whether the cursor is in a triangle
x, y - cursor coordinates
x1, y1, x2, y2, x3, y3 - coordinates of the angles of the triangle
the function returns true if the point x, y belongs to a triangle
function getPosition(x, y, x1, y1, x2, y2, x3, y3)
local k = (x1 - x) * (y2 - y1) - (x2 - x1) * (y1 - y)
local m = (x2 - x) * (y3 - y2) - (x3 - x2) * (y2 - y)
local n = (x3 - x) * (y1 - y3) - (x1 - x3) * (y3 - y)
return ((k >= 0 and m >= 0 and n >= 0) or (k <= 0 and m <= 0 and n <= 0))
end