-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.lua
54 lines (44 loc) · 1.35 KB
/
menu.lua
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
local gui = require "Quickie"
menu = Gamestate.new()
function menu:init()
end
function menu:enter()
love.graphics.setFont(Font)
love.graphics.setBackgroundColor(0,0,0)
-- group defaults
gui.group.default.size[1] = 500
gui.group.default.size[2] = 80
gui.group.default.spacing = 20
end
function menu:update(dt)
gui.group.push{grow = "down", pos = {Width/2-250,20}}
love.graphics.setFont(Font)
gui.Label{text = "A New World", align = "center"}
love.graphics.setFont(SmallFont)
gui.Label{text = "This game has been created in 48h for the MiniLD #37 (theme : not-game)", align = 'center'}
love.graphics.setFont(MenuFont)
if gui.Button{text = "Play"} then
Gamestate.switch(game)
end
if gui.Button{text = "Switch Fullscreen"} then
love.graphics.toggleFullscreen()
end
if gui.Button{text = "Quit"} then
love.event.quit()
end
end
function menu:draw()
gui.core.draw()
love.graphics.setFont(SmallFont)
love.graphics.printf("Controls : mouse & clic. This game has an ending", 0, 500, Width, 'center')
love.graphics.printf("A game by :\
- Aurélien Aptel (graphics & drums)\
- Pierre Lulé (code)\
- Frédéric Poussigue (guitar)",200,550,300, 'left')
love.graphics.printf("Framework : LÖVE (love2d.org)\
Libraries :\
- Quickie by vrld\
- hump by vrld\
- AnAL by bartbes\
- tween.lua by kikito",600,550,Width-500, 'left')
end