Thank you llamazing!
The following code works when clicking in the upper left corner. I kinda wish there was a debug mode that would show an outline of the area, but maybe it can be done with 4 pieces of a block image? Min/max?
EX:
|````minX ````|maxX
Two pieces split
|,,,,,,,minY ,,,,,,,|maxY
function sol.main:on_mouse_pressed(button,x,y)
if button == "left" and x <=50 and y<= 50 then
print("left pressed")
end
end