-
Notifications
You must be signed in to change notification settings - Fork 0
/
pause.lua
53 lines (46 loc) · 1.01 KB
/
pause.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
-- pause.lua: Pause menu overlay
overlays.pause = {}
local gui = {
resumebtn = {
type = "button",
x = 480, y = 40*5,
size = { x = 40*8, y = 96 },
label = S("Resume"),
on_click = function()
switchOverlay(false)
end,
keybind = 'escape'
},
restartbtn = {
type = "button",
x = 480, y = 40*9,
size = { x = 40*8, y = 96 },
label = S("Restart"),
on_click = function()
switchOverlay(false)
scenes.game.init()
end
},
exitbtn = {
type = "button",
x = 480, y = 40*13,
size = { x = 40*8, y = 96 },
label = S("Exit"),
on_click = function()
switchOverlay(false)
switchState('selectlevel')
end
}
}
function overlays.pause.update()
--gui = dofile('gui.lua')
gtk.update(gui, true)
end
function overlays.pause.draw()
love.graphics.setColor(64/255, 120/255, 161/255,0.9)
love.graphics.rectangle('fill', 380, 20, 520, 680)
love.graphics.setColor(1,1,1,1)
love.graphics.setFont(fonts.sans.bigger)
drawCenteredText(4, 64, base_resolution.x, 64, S("Game paused"))
gtk.draw(gui, true)
end