2023-11-15 14:06:56 +00:00
|
|
|
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')
|
2023-11-15 15:37:36 +00:00
|
|
|
Menu_left, Menu_top, Safe_width, Safe_height = love.window.getSafeArea()
|
2023-11-15 15:04:34 +00:00
|
|
|
Menu_height = 5 + Line_height + 5
|
|
|
|
Menu_bottom = Menu_top + Menu_height
|
|
|
|
Editor_state = edit.initialize_state(
|
2023-11-15 15:37:36 +00:00
|
|
|
Menu_bottom + 20, -- top
|
2023-11-18 11:56:10 +00:00
|
|
|
Safe_height/2-Line_height, -- bottom
|
2023-11-15 17:27:34 +00:00
|
|
|
Menu_left + 50 + Line_number_padding, -- left
|
2023-11-15 15:37:36 +00:00
|
|
|
math.min(100+30*App.width('m'), Safe_width*2/3), -- right
|
2023-11-15 15:04:34 +00:00
|
|
|
love.graphics.getFont():getHeight(), Line_height)
|
2023-11-15 14:06:56 +00:00
|
|
|
Text.redraw_all(Editor_state)
|
2023-11-15 15:04:34 +00:00
|
|
|
end
|