responsive layout
This commit is contained in:
parent
76cfb90d8c
commit
ce363a8245
|
@ -1,7 +1,5 @@
|
|||
on.initialize = function()
|
||||
math.randomseed(os.time())
|
||||
Font_size = Square_side*0.8
|
||||
Padding = (Square_side-Font_size)/2
|
||||
love.graphics.setFont(love.graphics.newFont(Font_size))
|
||||
initialize_layout()
|
||||
new()
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
initialize_layout = function()
|
||||
X = App.screen.width/4
|
||||
Y = App.screen.height/4
|
||||
Square_side = math.min(App.screen.width/5, App.screen.height/5, 100)
|
||||
Font_size = Square_side*0.8
|
||||
love.graphics.setFont(love.graphics.newFont(Font_size))
|
||||
Padding = (Square_side-Font_size)/2
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
on.resize = function()
|
||||
initialize_layout()
|
||||
end
|
Loading…
Reference in New Issue