Here's the code:
Code: Select all
menu = {}
function menu:enter()
menuimage = love.graphics.newImage("assets/images/menuimage.png")
cam:lookAt(menuimage:getWidth()/2, menuimage:getHeight()/2)
end
function menu:update(dt)
end
function menu:draw()
cam:attach()
love.graphics.draw(menuimage, 0, 0)
cam:detach()
end
function menu:mousereleased(x, y, key)
x = mouse.worldx
y = mouse.worldy
if x >= 25 and x <= 175 and y >= 285 and y <= 355 and key == 1 then
gamestate.switch(levelone)
end
end
