-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathplugin.lua
More file actions
35 lines (33 loc) · 826 Bytes
/
Copy pathplugin.lua
File metadata and controls
35 lines (33 loc) · 826 Bytes
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
-- Plugin entry point. Registers commands which activate jspedit.lua on use.
function init(plugin)
plugin:newCommand {
id = "jsp_import",
title = "Import JSP or JFT",
group = "file_import_1",
onclick = function()
dofile(app.fs.joinPath(plugin.path, "jspedit.lua")).import(plugin)
end,
}
plugin:newCommand {
id = "jsp_export",
title = "Export JSP",
group = "file_export_1",
onclick = function()
dofile(app.fs.joinPath(plugin.path, "jspedit.lua")).export(plugin)
end,
onenabled = function ()
return app.sprite ~= nil
end,
}
plugin:newCommand {
id = "jft_export",
title = "Export JFT",
group = "file_export_1",
onclick = function()
dofile(app.fs.joinPath(plugin.path, "jspedit.lua")).export_jft(plugin)
end,
onenabled = function ()
return app.sprite ~= nil
end,
}
end