sokoban.love/0031-on.resize

13 lines
515 B
Plaintext
Raw Normal View History

2023-11-15 15:37:36 +00:00
on.resize = function()
_, _, Safe_width, Safe_height = love.window.getSafeArea()
2023-11-22 05:23:31 +00:00
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
2023-11-22 05:23:31 +00:00
pane.editor_state.width = pane.editor_state.right - pane.editor_state.left
pane.editor_state.bottom = Safe_height/2-Line_height
2023-11-22 05:23:31 +00:00
Text.redraw_all(pane.editor_state)
2023-11-25 02:38:37 +00:00
update_output_editor(pane)
2023-11-22 05:23:31 +00:00
end
2023-11-15 15:37:36 +00:00
end