Display font characters in a nice grid

This commit is contained in:
mars 2023-04-16 16:45:55 -04:00
parent 3d8e806626
commit 75f626bf50
1 changed files with 4 additions and 1 deletions

View File

@ -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()