-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.lua
65 lines (58 loc) · 1.46 KB
/
main.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
55
56
57
58
59
60
61
62
63
64
65
function initUi()
app.registerUi({
["menu"] = "Pen tool",
["callback"] = "pen",
["accelerator"] = "p"
});
app.registerUi({
["menu"] = "Eraser tool",
["callback"] = "eraser",
["accelerator"] = "e"
});
app.registerUi({
["menu"] = "Text tool",
["callback"] = "text",
["accelerator"] = "t"
});
app.registerUi({
["menu"] = "Rectangular Select tool",
["callback"] = "rect_sel",
["accelerator"] = "r"
});
app.registerUi({
["menu"] = "\"Squiggly\" Select tool",
["callback"] = "squig_sel",
["accelerator"] = "s"
});
app.registerUi({
["menu"] = "Highlighter tool",
["callback"] = "highlighter",
["accelerator"] = "v"
});
app.registerUi({
["menu"] = "LaTex tool",
["callback"] = "latex",
["accelerator"] = "x"
});
end
function pen()
app.uiAction({ ["action"] = "ACTION_TOOL_PEN" })
end
function eraser()
app.uiAction({ ["action"] = "ACTION_TOOL_ERASER" })
end
function text()
app.uiAction({ ["action"] = "ACTION_TOOL_TEXT" })
end
function rect_sel()
app.uiAction({ ["action"] = "ACTION_TOOL_SELECT_RECT" })
end
function squig_sel()
app.uiAction({ ["action"] = "ACTION_TOOL_SELECT_REGION" })
end
function highlighter()
app.uiAction({ ["action"] = "ACTION_TOOL_HIGHLIGHTER" })
end
function latex()
app.uiAction({ ["action"] = "ACTION_TEX" })
end