-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLMTiming.lua
More file actions
76 lines (63 loc) · 1.42 KB
/
Copy pathLMTiming.lua
File metadata and controls
76 lines (63 loc) · 1.42 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
local S = require('core.shared')
local gates = require('gates.gates')
local routes = require('routes.routes')
local timing = require('timing.timing')
local delta = require('delta.delta')
local ghost = require('ghost.ghost')
local settings = require('settings.settings')
local main = require('main.main')
local banner = require('banner.banner')
local started = false
local function bootstrap()
if started then return end
started = true
S.init()
settings.init()
routes.init()
ghost.init()
timing.init()
delta.init()
main.init()
banner.init()
ac.log('[LMTiming] all modules initialised')
end
function script.update(dt)
bootstrap()
timing.update(dt)
end
render.on('main.track.transparent', function()
if not started then return end
ghost.draw()
if routes.isCreating() then
gates.draw(routes.getCreationGates())
else
local route = routes.getSelected()
if route then
gates.draw(route.gates, timing.gateLabel)
end
end
end)
function mainWindow(dt)
bootstrap()
main.window()
end
function timingWindow(dt)
bootstrap()
timing.window()
end
function routesWindow(dt)
bootstrap()
routes.window()
end
function deltaWindow(dt)
bootstrap()
delta.window()
end
function settingsWindow(dt)
bootstrap()
settings.window()
end
function fullscreenMain()
if not started then return end
banner.draw()
end