slightly better default sizing of drawings
This commit is contained in:
parent
f63beab657
commit
dc1f74b490
3
main.lua
3
main.lua
|
@ -38,7 +38,7 @@ previous_mode = nil
|
||||||
|
|
||||||
-- All drawings span 100% of some conceptual 'page width' and divide it up
|
-- All drawings span 100% of some conceptual 'page width' and divide it up
|
||||||
-- into 256 parts. `drawingw` describes their width in pixels.
|
-- into 256 parts. `drawingw` describes their width in pixels.
|
||||||
drawingw = 400 -- pixels
|
drawingw = nil -- pixels
|
||||||
function pixels(n) -- parts to pixels
|
function pixels(n) -- parts to pixels
|
||||||
return n*drawingw/256
|
return n*drawingw/256
|
||||||
end
|
end
|
||||||
|
@ -65,6 +65,7 @@ function love.load(arg)
|
||||||
love.window.setMode(screenw, screenh)
|
love.window.setMode(screenw, screenh)
|
||||||
love.window.setTitle("Text with Lines")
|
love.window.setTitle("Text with Lines")
|
||||||
love.keyboard.setTextInput(true) -- bring up keyboard on touch screen
|
love.keyboard.setTextInput(true) -- bring up keyboard on touch screen
|
||||||
|
drawingw = math.floor(screenh/2/40)*40
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.draw()
|
function love.draw()
|
||||||
|
|
Loading…
Reference in New Issue