about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index 2a1a281..c2e6aa6 100644
--- a/main.lua
+++ b/main.lua
@@ -75,8 +75,8 @@ function love.update(dt)
   if love.mouse.isDown('1') then
     for i, line in ipairs(lines) do
       if type(line) == 'table' then
-        local y = love.mouse.getY()
-        if y >= line.y and y < line.y + line.h then
+        local x, y = love.mouse.getX(), love.mouse.getY()
+        if y >= line.y and y < line.y + line.h and x >= 12 and x < 12+line.w then
           lines.current = line
           process_drag(line,love.mouse.getX(),love.mouse.getY())
         end