sum-grid.love/0033-initialize_layout

14 lines
449 B
Plaintext

initialize_layout = function()
_, _, Safe_width, Safe_height = love.window.getSafeArea()
X = App.screen.width/4
Y = App.screen.height/4
local w, h = App.screen.width/5, App.screen.height/5
if OS == 'iOS' or OS == 'Android' then
-- make space for the pop-up keyboard
h = h/2
end
Square_side = math.min(w, h, 100)
Font_size = Square_side*0.8
love.graphics.setFont(love.graphics.newFont(Font_size))
Padding = (Square_side-Font_size)/2
end