Integrate push
This commit is contained in:
parent
814222f0e9
commit
3d8e806626
19
main.lua
19
main.lua
|
@ -1,4 +1,15 @@
|
|||
local Atlas = require "atlas"
|
||||
local push = require "lib/push"
|
||||
|
||||
local gameWidth, gameHeight = 320, 200
|
||||
local windowWidth, windowHeight = love.window.getDesktopDimensions()
|
||||
windowWidth, windowHeight = windowWidth*.7, windowHeight*.7 --make the window a bit smaller than the screen itself
|
||||
local pushOpts = {
|
||||
fullscreen = false,
|
||||
resizable = true,
|
||||
}
|
||||
|
||||
push:setupScreen(gameWidth, gameHeight, windowWidth, windowHeight, pushOpts)
|
||||
|
||||
MultiMenu = {}
|
||||
MultiMenu.__index = MultiMenu
|
||||
|
@ -73,11 +84,15 @@ function love.load()
|
|||
end
|
||||
|
||||
function love.draw()
|
||||
push:start()
|
||||
|
||||
Menu:draw()
|
||||
|
||||
for sprite = 1,#Font.meshes do
|
||||
love.graphics.draw(Font.meshes[sprite], sprite * 10 + 100, 100)
|
||||
end
|
||||
|
||||
push:finish()
|
||||
end
|
||||
|
||||
function love.keypressed(key)
|
||||
|
@ -87,3 +102,7 @@ function love.keypressed(key)
|
|||
Menu:down()
|
||||
end
|
||||
end
|
||||
|
||||
function love.resize(w, h)
|
||||
return push:resize(w, h)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue