diff --git a/src/main.lua b/src/main.lua index bcd17cc..fd230f5 100644 --- a/src/main.lua +++ b/src/main.lua @@ -93,7 +93,7 @@ local function newdesign() -- user input local event = table.pack(os.pullEvent()) - if event[1] == "mouse_click" then + if (event[1] == "mouse_click" or event[1] == "mouse_drag") and event[3] > 0 and event[3] <= dimensions["x"] and event[4] > 0 and event[4] <= dimensions["z"] then if event[2] == 1 then -- left button, set buf[posasstring(event[3], currentfloor, event[4])] = true end