diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-06-02 18:52:49 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-06-02 18:52:49 -0700 |
commit | 51f4f13ecc39316c0115f617729ca699e13893e3 (patch) | |
tree | ca7b0b129927a57d18ee3523d2e0b74f58ee4dcc /app.lua | |
parent | 283c4e58046410ca44bd5d5e7480d2d14e721976 (diff) | |
download | lines.love-51f4f13ecc39316c0115f617729ca699e13893e3.tar.gz |
test harness now supports copy/paste
Diffstat (limited to 'app.lua')
-rw-r--r-- | app.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app.lua b/app.lua index ab22311..d7f3c72 100644 --- a/app.lua +++ b/app.lua @@ -178,6 +178,14 @@ function App.screen.draw(obj, x,y) end end +App.clipboard = '' +function App.getClipboardText() + return App.clipboard +end +function App.setClipboardText(s) + App.clipboard = s +end + function App.run_after_textinput(t) App.textinput(t) App.screen.contents = {} @@ -259,4 +267,6 @@ function App.disable_tests() App.screen.draw = love.graphics.draw App.width = function(text) return text:getWidth() end App.open_for_writing = function(filename) return io.open(filename, 'w') end + App.getClipboardText = love.system.getClipboardText + App.setClipboardText = love.system.setClipboardText end |