Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function love.load()
- love.window.setMode(800,600, {vsync = true})
- love.graphics.setBackgroundColor(0,0,0)
- winwidth = love.graphics.getWidth()
- winheight = love.graphics.getHeight()
- gamestate = "menu"
- titleFont = love.graphics.newFont(64)
- love.graphics.setFont(titleFont)
- titleText = "CRYPTIC\nCROSSWORDS"
- titleTextWidth,titleTextHeight = titleFont:getWidth(titleText),titleFont:getHeight(titleText)
- end
- function drawText(string,font,locationX,locationY)
- textWidth,textHeight = font:getWidth(string),font:getHeight(string)
- love.graphics.printf(string, 0, (locationY)-(textHeight), winwidth, 'center')
- end
- function love.update(dt)
- end
- function love.draw()
- if gamestate == "menu" then
- drawText(titleText,titleFont,winwidth/2,winheight/2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement