Easiest way to do this is to keep the screen areas for button and drawing disjoint.
ZD63LJ2TGWQQ5KWAX22QUWEYI2X5XUI2UTE4E7LGY26AS7HT2WGQC
K6HMLFLZNAXDRGXP5L2VK2NE2SZVYYRFY7UFHI3OV75KC5ABEF5AC
JCSLDGAH2F6AIY4Z6XM6K4LOMW7EFY3E4NF5YXLMHLTYTX3A4Z3QC
H7OEU6WPOKOSKV5RNAM5W62V5SYOY7VEA5VOK6JD5UEBUBIMOKUQC
JVRL5TWLBTWMTHJDZSDN5XQDMEIIPVAZBKUP75HMO7JHURAYWG5QC
OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC
XX7G2FFJ4QCGQGD4REAW5QFHVYAKCFUPGZCK7L6DFGS5ISVBYBQQC
KCIM5UTVV4KIL7SNRZFOW6FUQHGWAPOGQO4QTVNIWWBWMVG6GYNQC
TRCAEE2ASBJJCFFJYP2DGPLDOE4R2ACSY37PZSJSKOPQLATFO2EAC
EFMLTMZG5TUEGLSYLVKOKDSTGVSVWSKOMS7CJWOUGK5LADSH4YTQC
3XD6M3CFKZJR365MHXUWJ4HGSDTPYO6WYZ4RGW7ECBBITKVQX24QC
if y >= drawing.y and y < drawing.y + pixels(drawing.h) and x >= 12 and x < 12+drawingw then
local mx,my = coord(love.mouse.getX()-12), coord(love.mouse.getY()-drawing.y)
if y >= drawing.y and y < drawing.y + pixels(drawing.h) and x >= 16 and x < 16+drawingw then
local mx,my = coord(love.mouse.getX()-16), coord(love.mouse.getY()-drawing.y)