summary refs log tree commit diff
path: root/lib/main.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/main.fnl')
-rw-r--r--lib/main.fnl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/main.fnl b/lib/main.fnl
index e88f704..b657d94 100644
--- a/lib/main.fnl
+++ b/lib/main.fnl
@@ -77,6 +77,15 @@
   (when profi?
     (profi:stopHooks)))
 
+(fn love.mousepressed [x y button]
+  (match (pcall #(state.mousepressed the-state x y button))
+    (true x) nil
+    (false x) (do
+                (print (.. "mousepressed: \n" x))
+                (table.insert messages
+                              {:ticks 5
+                               :msg (.. "mousepressed: \n" x)}))))
+
 (fn love.keypressed [key scancode repeat]
   (when (and (= key "f") (not repeat))
     (love.window.setFullscreen (not (love.window.getFullscreen))))