21 lines
883 B
Plaintext
21 lines
883 B
Plaintext
on.initialize = function()
|
|
love.graphics.setFont(love.graphics.newFont(20))
|
|
Line_height = math.floor(love.graphics.getFont():getHeight()*1.3)
|
|
Line_number_padding = Line_number_width*App.width('m')
|
|
Menu_left, Menu_top, Safe_width, Safe_height = love.window.getSafeArea()
|
|
Menu_height = 5 + Line_height + 5
|
|
Menu_bottom = Menu_top + Menu_height
|
|
Editor_state = edit.initialize_state(
|
|
Menu_bottom + 20, -- top
|
|
Safe_height/2-Line_height, -- bottom
|
|
Menu_left + 50 + Line_number_padding, -- left
|
|
math.min(100+30*App.width('m'), Safe_width*2/3), -- right
|
|
love.graphics.getFont():getHeight(), Line_height)
|
|
Text.redraw_all(Editor_state)
|
|
Output_editor_state = edit.initialize_state(
|
|
Editor_state.bottom+5+10+5, -- top
|
|
nil, -- buttom
|
|
Editor_state.left, Editor_state.right,
|
|
love.graphics.getFont():getHeight(), Line_height)
|
|
Text.redraw_all(Output_editor_state)
|
|
end |