about summary refs log tree commit diff stats
path: root/app.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-25 13:38:33 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-25 13:38:33 -0700
commitc2eee640cfd01d64e1a0576ca3d6d99d6615561d (patch)
treeb8162d20a2380a9fb180de67d58cc9a06f6a5f41 /app.lua
parent442133fe7f629a825bbf30b05e29cc85b836c93c (diff)
downloadlines.love-c2eee640cfd01d64e1a0576ca3d6d99d6615561d.tar.gz
test and App helper for mouse clicks
Diffstat (limited to 'app.lua')
-rw-r--r--app.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/app.lua b/app.lua
index 311be18..3ed3aa8 100644
--- a/app.lua
+++ b/app.lua
@@ -186,6 +186,12 @@ function App.run_after_keychord(key)
   App.draw()
 end
 
+function App.run_after_mousepress(x,y, button)
+  App.mousepressed(x,y, button)
+  App.screen.contents = {}
+  App.draw()
+end
+
 function App.width(text)
   return text.text:getWidth()
 end