49 lines
1.3 KiB
Lua
49 lines
1.3 KiB
Lua
local gui, color, theme, utils, board, yaml, loader, scoreUpdater
|
|
|
|
multi, thread = require("multi"):init({priority=true})
|
|
multi.setClock(require("socket").gettime) -- When on linux os.clock doesn't reture actual seconds the program has elapsed for
|
|
GLOBAL, THREAD = require("multi.integration.loveManager"):init()
|
|
|
|
gui = require("gui")
|
|
color = require("gui.core.color")
|
|
theme = require("gui.core.theme")
|
|
utils = require("utils")
|
|
board = require("board")
|
|
yaml = require("yaml")
|
|
loader = require("loader")
|
|
require("gui.addons")
|
|
|
|
title = require("menus.title")
|
|
|
|
function love.load()
|
|
gui:cacheImage({"assets/images/checked.png","assets/images/unchecked.png","assets/images/speaker.png"})
|
|
gui:setAspectSize(1920, 1080)
|
|
gui.aspect_ratio = true
|
|
|
|
local bg = gui:newFrame()
|
|
bg:fullFrame()
|
|
bg.color = color.new("#242f9b")
|
|
|
|
require("menus.menus").init(bg)
|
|
|
|
title:visible(true)
|
|
|
|
bg:OnUpdate(function(self, dt)
|
|
if self.__blur then
|
|
-- pulse the blur between 2 and 12
|
|
local t = love.timer.getTime()
|
|
self:setBlurRadius(7 + 5 * math.sin(t * 2))
|
|
end
|
|
end)
|
|
end
|
|
|
|
function love.update(dt)
|
|
gui.update(dt)
|
|
multi:uManager(dt)
|
|
end
|
|
|
|
function love.draw()
|
|
gui.draw()
|
|
end
|
|
|