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["level3"], 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("Mitä teen illalla?", 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("- Pelaan mäinkräftiä", 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("- Näen kavereita", 120, 380) 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["level4"]) elseif y > 380 and y < 440 then Sounds["click"]:play() Gamestate.switch(States["lose"]) end end end return state