on.mouse_press = function(x,y, mouse_button) for _,editor in ipairs(Editors) do editor.selection1 = {} end for i,editor in ipairs(Editors) do if x >= editor.left and x <= editor.right then Cursor_editor = editor edit.mouse_press(editor, x,y, mouse_button) break end end end