sokoban.love/0032-update_font_settings

13 lines
614 B
Plaintext

update_font_settings = function(font_height)
love.graphics.setFont(love.graphics.newFont(font_height))
Line_height = math.floor(love.graphics.getFont():getHeight()*1.3)
Line_number_padding = Line_number_width*App.width('m')
Menu_height = 5 + Line_height + 5
Menu_bottom = Menu_top + Menu_height
Editor_state.top = Menu_bottom + 20
Editor_state.left = Menu_left + 50 + Line_number_padding
Editor_state.right = math.min(100+30*App.width('m'), Safe_width*2/3)
Editor_state.width = Editor_state.right - Editor_state.left
edit.update_font_settings(Editor_state, font_height)
Text.redraw_all(Editor_state)
end