Hey everybody. I am currently working on adding a menu to my game, however clicking buttons seems to do nothing. It's frustrating me now, because there is no error and I cannot find for the life of me a reason why this wont work. Here is the code.
function button_click(x, y)
for i,self in ipairs (button) do
if x > self.x and
x < self.x + medium:getWidth(self.text) and
y > self.y and
y< self.y + medium:getHeight(self.text) then
if self.id == "quit" then
love.event.quit()
end
end
end
end