Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. function love.load()
  2. love.window.setMode(800,600, {vsync = true})
  3. love.graphics.setBackgroundColor(0,0,0)
  4. winwidth = love.graphics.getWidth()
  5. winheight = love.graphics.getHeight()
  6.  
  7. gamestate = "menu"
  8.  
  9. titleFont = love.graphics.newFont("calibri.ttf",40)
  10. love.graphics.setFont(titleFont)
  11.  
  12. titleText = "CRYPTIC\nCROSSWORDS"
  13. titleTextWidth,titleTextHeight = titleFont:getWidth(titleText),titleFont:getHeight(titleText)
  14. end
  15.  
  16. function love.update(dt)
  17. end
  18.  
  19. function love.draw()
  20. if gamestate == "menu" then
  21. love.graphics.print(titleText, (winwidth/2)-(titleTextWidth/2), (winheight/2)-(titleTextHeight/2))
  22. end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement