20 lines
848 B
Plaintext
20 lines
848 B
Plaintext
update_font_settings = function(font_height)
|
|
Font_height = font_height
|
|
love.graphics.setFont(love.graphics.newFont(font_height))
|
|
Line_height = math.floor(font_height*1.3)
|
|
Line_number_padding = Line_number_width*App.width('m')
|
|
Menu_height = 5 + Line_height + 5
|
|
Menu_bottom = Menu_top + Menu_height
|
|
for _,pane in ipairs(Panes) do
|
|
pane.editor_state.top = Menu_bottom + 20
|
|
pane.editor_state.left = Menu_left + 50 + Line_number_padding
|
|
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
|
|
edit.update_font_settings(pane.editor_state, font_height)
|
|
Text.redraw_all(pane.editor_state)
|
|
update_output_editor(pane)
|
|
end
|
|
end |