blob: 7e828570bbdfed40e2c3dcc1624983789b7baca6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
local Menu = {}
local Gui = require "Quickie"
local Utils = require "Utils"
local GUI = { Menu = require("GUI/Menu")}
local Gamestates = require "Gamestates/Init"
function Menu:update(dt)
Gui.group{grow = "down", pos = {Utils.percentCoordinates(10, 10)}, function()
for _, name in ipairs(GUI.Menu.Buttons) do
if Gui.Button{text = name, size = {Utils.percentCoordinates(80, 10)}} then
Gamestate.switch(Gamestates[name])
end
end
end}
end
function Menu:draw()
Gui.core.draw()
end
return Menu
|