state = {}

function state:enter()
  love.graphics.setBackgroundColor(0.9, 0.9, 0.9)
end

function state:draw()
  love.graphics.setColor(1, 1, 1)
  love.graphics.rectangle("fill", 93, 110, 500, 150)
  love.graphics.draw(Images["level12"], 687, 110)
  love.graphics.setColor(0, 0, 0)
  love.graphics.rectangle("line", 687, 110, 500, 500)
  love.graphics.rectangle("line", 93, 110, 500, 150)
  love.graphics.setFont(Font35)
  love.graphics.print("Kerran pyyhkäisin paksut limat", 103, 117)

  love.graphics.setFont(Font60)

  love.graphics.setColor(0, 0, 0)
  if love.mouse.getX() > 120 and love.mouse.getX() < 600 then
    if love.mouse.getY() > 300 and love.mouse.getY() < 360 then
      love.graphics.setColor(0.6, 0.6, 0.6)
    end
  end
  love.graphics.print("- iskän pyyhkeeseen.", 120, 300)

  love.graphics.setColor(0, 0, 0)
  if love.mouse.getX() > 120 and love.mouse.getX() < 600 then
    if love.mouse.getY() > 380 and love.mouse.getY() < 440 then
      love.graphics.setColor(0.6, 0.6, 0.6)
    end
  end
  love.graphics.print("- kissan kylkeen.", 120, 380)

  love.graphics.setColor(0, 0, 0)
  if love.mouse.getX() > 120 and love.mouse.getX() < 600 then
    if love.mouse.getY() > 460 and love.mouse.getY() < 520 then
      love.graphics.setColor(0.6, 0.6, 0.6)
    end
  end
  love.graphics.print("- siskon lakanaan.", 120, 460)

end

function state:mousereleased(x, y, button, istouch, presses)
  if x > 120 and x < 600 then
    if y > 300 and y < 360 then
      Sounds["click"]:play()
      Gamestate.switch(States["lose"])
    elseif y > 380 and y < 440 then
      Sounds["click"]:play()
      Gamestate.switch(States["level13"])
    elseif y > 460 and y < 520 then
      Sounds["click"]:play()
      Gamestate.switch(States["lose"])
    end
  end
end

return state
