Display font characters in a nice grid
This commit is contained in:
parent
3d8e806626
commit
75f626bf50
5
main.lua
5
main.lua
|
@ -89,7 +89,10 @@ function love.draw()
|
|||
Menu:draw()
|
||||
|
||||
for sprite = 1,#Font.meshes do
|
||||
love.graphics.draw(Font.meshes[sprite], sprite * 10 + 100, 100)
|
||||
local width = 12
|
||||
local row = math.floor(sprite / width)
|
||||
local col = sprite - row * width
|
||||
love.graphics.draw(Font.meshes[sprite], col * 10, row * 10)
|
||||
end
|
||||
|
||||
push:finish()
|
||||
|
|
Loading…
Reference in New Issue