D2KRR2KTJJQCVGQYIEJDLV4NKMXBSNN6WOB62BVZ67KKMBRITD7AC
DGCSQ3UZPKUYOPKGLTOLCRBXHJC2NQT6P47WSSHAKDU6OWRBKMHAC
5R2LPB3UGD6S6YTJKRFA7FOCTZERZW5ACCPP46KQWY7K3FZ7ASQAC
NFI42KGXEHTNACH2CATBLJIAXJYNV2C3QBPR2ORPJZKOVEREVM7QC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC
QEXZHD2VPCM4TAPP7PR2K2PIR4BVES5IZWC3T6ZRNJWKWOXFILNQC
OI4FPFINEROK6GNDEMOBTGSPYIULCLRGGT5W3H7VLM7VFH22GMWQC
JOPVPUSAMMU6RFVDQR4NJC4GNNUFB7GPKVH7OS5FKCYS5QZ53VLQC
VHQCNMARPMNBSIUFLJG7HVK4QGDNPCGNVFLHS3I4IGNVSV5MRLYQC
function is_absolute_path(path)
local os_path_separator = package.config:sub(1,1)
if os_path_separator == '/' then
-- POSIX systems permit backslashes in filenames
return path:sub(1,1) == '/'
elseif os_path_separator == '\\' then
local f = path:sub(1,1)
return f == '/' or f == '\\'
else
error('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"')
end
end
function is_relative_path(path)
return not is_absolute_path(path)
end
if is_relative_path(filename) then
filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
end
--? print('saving source settings', Settings.source.x, Settings.source.y, Settings.source.displayindex)
return {
x=Settings.source.x, y=Settings.source.y, displayindex=Settings.source.displayindex,
width=App.screen.width, height=App.screen.height,
font_height=Editor_state.font_height,
filename=filename,
screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1,
show_log_browser_side=Show_log_browser_side,
focus=Focus,
}
end
function source.mouse_pressed(x,y, mouse_button)
Cursor_time = 0 -- ensure cursor is visible immediately after it moves
--? print('mouse click', x, y)
--? print(Editor_state.left, Editor_state.right)
--? print(Log_browser_state.left, Log_browser_state.right)
if is_relative_path(filename) then
filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
end
return {
function is_absolute_path(path)
local os_path_separator = package.config:sub(1,1)
if os_path_separator == '/' then
-- POSIX systems permit backslashes in filenames
return path:sub(1,1) == '/'
elseif os_path_separator == '\\' then
local f = path:sub(1,1)
return f == '/' or f == '\\'
else
error('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"')
end
end
function is_relative_path(path)
return not is_absolute_path(path)
end
local os_path_separator = package.config:sub(1,1)
if filename:sub(1,1) ~= os_path_separator then
filename = love.filesystem.getWorkingDirectory()..os_path_separator..filename
if is_relative_path(filename) then
filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
local os_path_separator = package.config:sub(1,1)
if filename:sub(1,1) ~= os_path_separator then
filename = love.filesystem.getWorkingDirectory()..os_path_separator..filename
if is_relative_path(filename) then
filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows