about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-11 21:52:57 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-11 21:52:57 -0700
commita405f9e77742aff0e3eff84f06efecf3a125ea13 (patch)
treeb6b3ca3d00963a222f6a235910df80584b48bbb5 /main.lua
parent1ff2711fd96e25b4673818830df466cbcea3908a (diff)
downloadtext.love-a405f9e77742aff0e3eff84f06efecf3a125ea13.tar.gz
inline
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/main.lua b/main.lua
index 5052662..cc7f67c 100644
--- a/main.lua
+++ b/main.lua
@@ -81,17 +81,13 @@ function love.update(dt)
         local x, y = love.mouse.getX(), love.mouse.getY()
         if y >= drawing.y and y < drawing.y + drawing.h and x >= 12 and x < 12+drawing.w then
           lines.current = drawing
-          process_drag(drawing,love.mouse.getX(),love.mouse.getY())
+          table.insert(drawing.pending, {x=love.mouse.getX(), y=love.mouse.getY()})
         end
       end
     end
   end
 end
 
-function process_drag(drawing, x,y)
-  table.insert(drawing.pending, {x=x, y=y})
-end
-
 function love.mousereleased(x,y, button)
   if lines.current then
     if lines.current.pending then