aboutsummaryrefslogtreecommitdiffstats
path: root/main.lua
blob: ed3819197280c54db0cb62d454a6bb015afa449d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Gui = require "Quickie"
Gamestate = require "hump.gamestate"
Timer = require "hump.timer"
Config = require "Config"
Utils = require "Utils"
SMFileSchema = require "SMFileSchema"
Files = require "Files"
Config = require "Config"
Game = require "Game"
Menu = require "Menu"

function love.load()
    -- preload fonts
    fonts = {
        [12] = love.graphics.newFont(12),
        [20] = love.graphics.newFont(20),
    }
    love.graphics.setBackgroundColor(17,17,17)
    love.graphics.setFont(fonts[20])

    -- group defaults
    Gui.group.default.size[1] = 150
    Gui.group.default.size[2] = 25
    Gui.group.default.spacing = 5

    Gamestate.registerEvents()
    Gamestate.switch(Menu)
end

function love.update(dt)
    Config.width, Config.height = love.window.getDimensions()
end

function love.draw()
    Gui.core.draw()
end