function love.draw()
local mouseX,mouseY=love.mouse.getPosition()
love.graphics.draw(mouse,mouseX,mouseY)
for i=1,25 do
if mouseX>=varx[i] and mouseY>=vary[i] and mouseY<vary[i]+varh[i] and mouseX<varx[i]+varw[i] then
love.graphics.setColor(255,0,0,255)
love.graphics.rectangle("fill",varx[i],vary[i],varw[i],varh[i])
end
love.graphics.setColor(0,255,0,255)
love.graphics.rectangle("line",varx[i],vary[i],varw[i],varh[i])
end
end
It should look like this, it works for me.