NainSaatTyttoystavanFeatJoh.../mainmenu.lua

37 lines
1.1 KiB
Lua

local menu = {}
function menu:enter()
love.graphics.setBackgroundColor(0.9, 0.9, 0.9)
end
function menu:draw()
love.graphics.setColor(0.8, 0.8, 0.8)
love.graphics.rectangle("fill", 0, 480, 1280, 240)
love.graphics.setColor(1, 1, 1)
love.graphics.draw(Images["menu"], 490, 50)
love.graphics.rectangle("fill", 80, 405, 1120, 150)
love.graphics.setColor(0, 0, 0)
love.graphics.rectangle("line", 80, 405, 1120, 150)
love.graphics.setFont(Font60)
love.graphics.print("Näin saat tyttöystävän feat. Johtaja98", 150, 425)
love.graphics.setFont(Font35)
love.graphics.print("Miten Johtaja98 toimisi seuraavissa tilanteissa?", 280,500)
love.graphics.setFont(Font60)
if love.mouse.getX() > 578 and love.mouse.getX() < 703 then
if love.mouse.getY() > 620 and love.mouse.getY() < 670 then
love.graphics.setColor(0.6, 0.6, 0.6)
end
end
love.graphics.print("Pelaa", 578, 620)
end
function menu:mousereleased(x, y, button, istouch, presses)
if x > 578 and x < 703 and y > 620 and y < 670 then
Sounds["click"]:play()
Gamestate.switch(States["level1"])
end
end
return menu