-
Notifications
You must be signed in to change notification settings - Fork 3
/
help.lua
51 lines (46 loc) · 1.14 KB
/
help.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
help = {index = 1}
registerstate'help'
function help.load()
help.pages = {
{
title = 'Game controls',
{'Up/W', 'Accelerate'},
{'Left/A', 'Turn left'},
{'Right/D', 'Turn right'},
{'Hold Shift', 'Turbo (drains oil)'},
{'Escape', 'Open menu'},
{'Enter', 'Enter base'},
{'S', 'Autopilot'},
{'Shift+S', 'Autopilot with larger cruise speed'},
{'B', 'Automatic braking'},
{'C', 'Toggle cargo view'},
{'J/K', 'Go through cargo list'},
{'L', 'Select cargo item'},
{'H', 'Go back to cargo list'},
{'P', 'Pause'},
{'PgUp', 'Zoom in'},
{'PgDown', 'Zoom out'},
{';', 'Open command prompt, press backspace to close'},
{'F7', 'Toggle UI visibility'},
},
}
end
function help.update(dt)
end
function help.draw()
local p = help.pages[help.index]
love.graphics.print(p.title, 10, 40)
love.graphics.setFont(mediumfont)
for i=1,#p do
love.graphics.print(p[i][1], 35, 60 + 30 * i)
love.graphics.print(p[i][2], 155, 60 + 30 * i)
end
love.graphics.setFont(largefont)
end
function states.help.keypressed.escape()
state.current = 'game'
love.graphics.setFont(smallfont)
end
function help.allowsave()
return false
end