Merge lines.love

This commit is contained in:
Kartik K. Agaram 2023-01-01 09:30:59 -08:00
commit 9c85f33c55

15
run.lua
View File

@ -148,9 +148,9 @@ function run.initialize(arg)
print('put any notes there (and make frequent backups)')
if Settings.width then
load_settings()
run.load_settings()
else
initialize_default_settings()
run.initialize_default_settings()
end
if Display_settings.column_width > App.screen.width - Padding_horizontal - Margin_left - Margin_right - Padding_horizontal then
@ -170,9 +170,8 @@ function run.initialize(arg)
end
end
function load_settings()
-- maximize window to determine maximum allowable dimensions
love.window.setMode(0, 0) -- maximize
function run.load_settings()
-- determine default dimensions and flags
App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()
--? print('max height', App.screen.height)
-- set up desired window dimensions
@ -196,8 +195,8 @@ function load_settings()
Display_settings.y = Settings.surface_y
end
function initialize_default_settings()
initialize_window_geometry()
function run.initialize_default_settings()
run.initialize_window_geometry()
love.graphics.setFont(love.graphics.newFont(Font_height))
Em = App.newText(love.graphics.getFont(), 'm')
Display_settings.column_width = 40*App.width(Em)
@ -205,7 +204,7 @@ function initialize_default_settings()
command.recently_modified()
end
function initialize_window_geometry()
function run.initialize_window_geometry()
-- maximize window
love.window.setMode(0, 0) -- maximize
App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()