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EFXXTDDAC PRE6XPRNICDCHMF7C45A6DRPVT47IPAIWW6Q7AHNGW3D2PBGOPNAC 6DJMOJKEO5DIOEDV655SPA7C7HN2HXWMDJ7UF2CRDRBAF5YO3UEAC ZM7NOBRMD5HHA35Y4JDC76EOA2RD4KQOQCPURXYKXA6ABMKOJIGQC press_previous_pane_button = function()Show_menu = nilCurrent_pane.car = carCurrent_pane_index = Current_pane_index-1Current_pane = Panes[Current_pane_index]car = Current_pane.car or {}end
press_next_pane_button = function()Show_menu = nilCurrent_pane.car = carCurrent_pane_index = Current_pane_index+1Current_pane = Panes[Current_pane_index]car = Current_pane.car or {}end
press_load_button = function()Show_menu = nilShow_file_dialog = trueFile_dialog_callback = function(filename)if filename == '' then-- clear filenameCurrent_pane.filename = nilreturnendCurrent_pane.filename = filenameone_time_load()-- Load new filename in future sessions.-- On mobile devices, we can't depend on on.save_settings() triggering on quit.love.filesystem.write('config', json.encode(settings()))endend
press_save_button = function()Show_menu = nilif Current_pane.filename == nil thenShow_file_dialog = trueFile_dialog_callback = function(filename)if filename == '' then return endCurrent_pane.filename = filenameone_time_save()-- Load new filename in future sessions.-- On mobile devices, we can't depend on on.save_settings() triggering on quit.love.filesystem.write('config', json.encode(settings()))endelseone_time_save()endend
press_hide_button = function()Show_menu = nilShow_code = falseend
press_show_button = function()Show_menu = nilShow_code = trueend
press_stop_button = function()if car.quit thencall_protected(car.quit)endShow_menu = nilclear_handlers()end
press_run_button = function()Show_menu = nil-- ## run: initializeclear_handlers()local buf = table.concat(map(Current_pane.editor_state.lines, function(line) return line.data end), '\n')Current_pane.canvas = love.graphics.newCanvas()love.graphics.setCanvas(Current_pane.canvas)love.graphics.push('all')love.graphics.setBackgroundColor(1,1,1)edit.clear(Current_pane.output_editor_state)print = print_to_output-- ## runlocal status, result = live.eval(buf, 'editor')-- ## run: save some stuff, clean up the restprint = Real_printif result then-- could be either output or errortable.insert(Current_pane.output_editor_state.lines, {data=tostring(result)})endif #Current_pane.output_editor_state.lines == 0 thentable.insert(Current_pane.output_editor_state.lines, {data=''})endText.redraw_all(Current_pane.output_editor_state)love.graphics.pop()love.graphics.setCanvas()end
return overflowable_button('save', x, y, r,function()Show_menu = nilif Current_pane.filename == nil thenShow_file_dialog = trueFile_dialog_callback = function(filename)if filename == '' then return endCurrent_pane.filename = filenameone_time_save()-- Load new filename in future sessions.-- On mobile devices, we can't depend on on.save_settings() triggering on quit.love.filesystem.write('config', json.encode(settings()))endelseone_time_save()endend)
return overflowable_button('save', x, y, r, press_save_button)
styled_button('stop', x,y,function()if car.quit thencall_protected(car.quit)endShow_menu = nilclear_handlers()end)
styled_button('stop', x,y, press_stop_button)
return overflowable_button('hide', x, y, r,function()Show_menu = nilShow_code = falseend)end
return overflowable_button('hide', x, y, r, press_hide_button)end
return overflowable_button('show', x, y, r,function()Show_menu = nilShow_code = trueend)end
return overflowable_button('show', x, y, r, press_show_button)end
end,onpress1 = function()Show_menu = nilCurrent_pane.car = carCurrent_pane_index = Current_pane_index+1Current_pane = Panes[Current_pane_index]car = Current_pane.car or {}
end,onpress1 = function()Show_menu = nilCurrent_pane.car = carCurrent_pane_index = Current_pane_index-1Current_pane = Panes[Current_pane_index]car = Current_pane.car or {}
styled_button('run', x,y,function()Show_menu = nil-- ## run: initializeclear_handlers()local buf = table.concat(map(Current_pane.editor_state.lines, function(line) return line.data end), '\n')Current_pane.canvas = love.graphics.newCanvas()love.graphics.setCanvas(Current_pane.canvas)love.graphics.push('all')love.graphics.setBackgroundColor(1,1,1)edit.clear(Current_pane.output_editor_state)print = print_to_output-- ## runlocal status, result = live.eval(buf, 'editor')-- ## run: save some stuff, clean up the restprint = Real_printif result then-- could be either output or errortable.insert(Current_pane.output_editor_state.lines, {data=tostring(result)})endif #Current_pane.output_editor_state.lines == 0 thentable.insert(Current_pane.output_editor_state.lines, {data=''})endText.redraw_all(Current_pane.output_editor_state)love.graphics.pop()love.graphics.setCanvas()end)
styled_button('run', x,y, press_run_button)
if Current_pane.editor_state.cursor_x then
if chord == 'C-left' then press_previous_pane_button()elseif chord == 'C-right' then press_next_pane_button()elseif chord == 'f1' then press_run_button()elseif chord == 'f2' then press_stop_button()elseif chord == 'f3' then press_hide_button()elseif chord == 'f4' then press_save_button()elseif chord == 'f5' then press_load_button()elseif Current_pane.editor_state.cursor_x then