add mouse dragging

This commit is contained in:
Justus Wolff
2026-02-15 11:07:21 +01:00
parent 87fe8980ac
commit 3396396379

View File

@@ -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