pothi.love/0179-on.mouse_press

13 lines
292 B
Plaintext
Raw Normal View History

2022-12-24 04:39:54 +00:00
on.mouse_press = function(x,y, mouse_button)
2022-12-18 02:32:18 +00:00
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
local node = to_text(x,y)
if node then
Cursor_node = node
edit.mouse_pressed(node.editor, x,y, mouse_button)
else
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
end