-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplay_infos.lua
More file actions
48 lines (41 loc) · 1.27 KB
/
Copy pathdisplay_infos.lua
File metadata and controls
48 lines (41 loc) · 1.27 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
local frame_ranges_to_annotate = dofile("/home/lua/data/infos.lua")
j_pressed = false
left_pressed = false
right_pressed = false
function onInput()
j_pressed = input.getKey(65505) == 1
left_pressed = input.getKey(65361) == 1
right_pressed = input.getKey(65363) == 1
end
function onPaint()
local f = movie.currentFrame()
for _, range in ipairs(frame_ranges_to_annotate) do
local start_frame, end_frame, msg, msg_rta, diff, rerecords = table.unpack(range)
if f >= start_frame and f <= end_frame then
-- Draw text at top-left
gui.text(30, 575, msg, 0xffffffff, 0, 0, 15)
gui.text(30, 585, msg_rta, 0xffff00ff, 0, 0, 15)
gui.text(370, 580, diff, 0xffffffff, 0, 0, 15)
gui.text(690, 5, "rerecords: " .. rerecords, 0xffffffff, 0, 0, 15)
break -- stop after first matching range
end
end
if j_pressed then
color = 0xffffffff
else
color = 0xff000000
end
gui.text(700, 580, "J", color)
if left_pressed then
color = 0xffffffff
else
color = 0xff000000
end
gui.text(715, 580, "<-", color)
if right_pressed then
color = 0xffffffff
else
color = 0xff000000
end
gui.text(730, 580, "->", color)
end