sokoban.love/0011-on.initialize

29 lines
875 B
Plaintext

on.initialize = function()
App.mkdir(Directory)
populate_missing_handlers()
if Font_filename == nil then
Font = love.graphics.newFont(Font_height)
else
Font = love.graphics.newFont(Font_filename, Font_height)
end
love.graphics.setFont(Font)
Line_height = math.floor(Font_height*1.3)
Line_number_padding = Line_number_width*Font:getWidth('m')
Menu_left, Menu_top, Safe_width, Safe_height = love.window.getSafeArea()
Menu_height = 5 + Line_height + 5
Menu_bottom = Menu_top + Menu_height
load_panes_from_previous_session()
if #Panes == 0 then
table.insert(Panes, new_pane())
Current_pane_index = 1
Current_pane = Panes[Current_pane_index]
Current_pane.filename = 'main'
one_time_load()
else
Current_pane_index = 1
Current_pane = Panes[Current_pane_index]
end
Output_editor_state = output_editor_state(Current_pane.editor_state)
run_app()
end