summaryrefslogtreecommitdiff
path: root/designer
diff options
context:
space:
mode:
Diffstat (limited to 'designer')
-rw-r--r--designer/main.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/designer/main.lua b/designer/main.lua
index 0b8ad5d..f3b5e8f 100644
--- a/designer/main.lua
+++ b/designer/main.lua
@@ -88,6 +88,14 @@ function love.wheelmoved(_, y)
end
end
+function to_commands(lines)
+ local t = {}
+ for _, l in ipairs(lines) do
+ table.insert(t, "\tline("..table.concat(l, ", ")..")\n")
+ end
+ return table.concat(t)
+end
+
function to_array(lines)
local t = {}
for _, l in ipairs(lines) do
@@ -104,6 +112,12 @@ function love.keypressed(key)
else
love.system.setClipboardText(to_array(lines))
end
+ elseif key == "v" then
+ local c, err = loadstring("return "..love.system.getClipboardText())
+ if c then
+ local ok, ls = pcall(c)
+ if ok then lines = ls end
+ end
end
end
end