add mouse dragging
This commit is contained in:
@@ -93,7 +93,7 @@ local function newdesign()
|
|||||||
|
|
||||||
-- user input
|
-- user input
|
||||||
local event = table.pack(os.pullEvent())
|
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
|
if event[2] == 1 then -- left button, set
|
||||||
buf[posasstring(event[3], currentfloor, event[4])] = true
|
buf[posasstring(event[3], currentfloor, event[4])] = true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user