title: How Do I Use A Targeted Mouse-Click Function with Love2D?
body: <p>I am trying to make it so that if a user clicks the left mouse button at 200x300 then a variable will be changed. I searched online for tutorials but cannot find a solution.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function love.load()
   medium = love.graphics.newFont(45)
   small = love.graphics.newFont(25)
   micro = love.graphics.newFont(14)
  
   StartGame = false
  end
  
  function love.draw()
   love.graphics.setColor(255, 0, 0)
   love.graphics.setFont(small)
   love.graphics.print("Play", 200, 300)
  end
  
  function love.mousepressed(x, y, button)
   if love.mousepressed( 200, 300, 'l' ) then
    StartGame = true
   end
  end
  
  function love.mousereleased(x, y, button)
  end
  
  function love.quit()
  end</code></pre>
  </div>
  </div>
  </p>