TBRTM3AARI73LHUKOGIT66J5T3UTXQPJFLVJW7ZEBPZCOXAOGIIQC
DUQDA3U7VNWZSKRVACS6G3FTEB5VXRR7FJQU5NYZ4EFSGL3XUU5QC
UUAE3VQIDTQ6WXHSCB53SXTTZCPOAYHDXJ6OFDLK4IZ6C5MZFMTQC
OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC
MHOUX5JFGBFYMOULX3NZA2JXH6PF2227DT54EEXLBUZQFO7NDI2AC
YGCT2D2ORMLTBHANLGHZV3EBGGHD7ZK55UAM7HF2AVSHDXAAKK5QC
J3ER7DFO2TXYUMJAXZUFEHQNLFDNIXSYDTE7HEFGQ2RYB3A6RFPAC
end
function load_settings()
local settings = json.decode(love.filesystem.read('config'))
-- maximize window to determine maximum allowable dimensions
App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()
-- set up desired window dimensions
App.screen.flags.resizable = true
App.screen.flags.minwidth = math.min(App.screen.width, 200)
App.screen.flags.minheight = math.min(App.screen.width, 200)
App.screen.width, App.screen.height = settings.width, settings.height
love.window.setMode(App.screen.width, App.screen.height, App.screen.flags)
love.window.setPosition(settings.x, settings.y, settings.displayindex)
--? -- TODO: save important settings
--? local x,y,displayindex = love.window.getPosition()
--? local filename = Editor_state.filename
--? if filename:sub(1,1) ~= '/' then
--? filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
--? end
--? local settings = {
--? x=x, y=y, displayindex=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}
--? love.filesystem.write('config', json.encode(settings))
-- save some important settings
local x,y,displayindex = love.window.getPosition()
local settings = {
x=x, y=y, displayindex=displayindex,
width=App.screen.width, height=App.screen.height,
}
love.filesystem.write('config', json.encode(settings))