sokoban.love/0031-on.resize

13 lines
515 B
Plaintext

on.resize = function()
_, _, Safe_width, Safe_height = love.window.getSafeArea()
for _,pane in ipairs(Panes) do
pane.editor_state.right = math.min(100+30*App.width('m'), Safe_width*2/3)
if pane.editor_state.right < pane.editor_state.left then
pane.editor_state.right = pane.editor_state.left+1
end
pane.editor_state.width = pane.editor_state.right - pane.editor_state.left
pane.editor_state.bottom = Safe_height/2-Line_height
Text.redraw_all(pane.editor_state)
update_output_editor(pane)
end
end