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53MK737X3KG6QC
AM42E4Y6RLS7QPWBMESL6H5RPFKG5LQYM6EFNB5UYSRSUASKLISQC
7M7LS7I2QT6AFZ6RVK5KK2CZ6SNJAMQIWD7MX34F7MQ3MZKH72GAC
S7ZZA3YEKYGLBN6UC2N7WGUS43L6MX2KQQ2LBUZT4FQ7K7V5IQGQC
KVHUFUFVOSY6GB4XI2QK4T4WCLIYOV3NZR67TX6AQHAQDWJMEOBQC
CTK7YUFZFOV53EDPU2OJ7PV4TKORDXRVYTYF3FMQGKIT2HQCN2AQC
4447N732DNCNIMDDBCOQN2LUUQ6LILPXTUBHVUK42UX34VEC3B6QC
DWZK32YDFQIUYR4LDUUFLOPJMUVJMFDP2RKW2L3QFAGUHAWPJU2AC
BPL2TDWHU2IJNONZZEWNP7A3FMSKBUWXHC6Z4PJSE7QUGCRXAQIAC
27DROQW2CHKBMWQCCR7N7VK54P3HE7MESZIJSJ32JTPKEE23WJPAC
FS2ITYYHBLFT66YUC3ENPFYI2HOYHOVEPQIN7NQR6KF5MEK4NKZAC
UEE5W7WJ46FIBN4ZH45Z33L4RYXK5AP5ZIBHYTFOJTDWVVX54QKAC
-- both sides require (different parts of) the logging framework
load_file_from_source_or_save_directory('log.lua')
-- but some files we want to only load sometimes
function App.load()
Text.redraw_all(Editor_state)
Editor_state.selection1 = {} -- no support for shift drag while we're resizing
Text.tweak_screen_top_and_cursor(Editor_state, Editor_state.left, Editor_state.right)
Last_resize_time = App.getTime()
end
function love.quit()
edit.quit(Editor_state)
-- save some 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
--
if Current_app == 'run' then
run.update(dt)
elseif Current_app == 'source' then
source.update(dt)
else
assert(false, 'unknown app "'..Current_app..'"')
end
function App.keychord_pressed(chord, key)
-- ignore events for some time after window in focus (mostly alt-tab)
if App.getTime() < Last_focus_time + 0.01 then
return
end
--
if chord == 'C-e' then
-- carefully save settings
if Current_app == 'run' then
local source_settings = Settings.source
Settings = run.settings()
Settings.source = source_settings
if run.quit then run.quit() end
Current_app = 'source'
elseif Current_app == 'source' then
Settings.source = source.settings()
if source.quit then source.quit() end
Current_app = 'run'
else
assert(false, 'unknown app "'..Current_app..'"')
end
Settings.current_app = Current_app
love.filesystem.write('config', json.encode(Settings))
-- reboot
load_file_from_source_or_save_directory('main.lua')
App.undo_initialize()
App.run_tests_and_initialize()
return
local settings = {
x=x, y=y, displayindex=displayindex,
width=App.screen.width, height=App.screen.height,
font_height=Editor_state.font_height,
screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1}
love.filesystem.write('config', json.encode(settings))
end