word wrap

This commit is contained in:
airstruck
2015-11-26 08:53:42 -05:00
parent bbba7e1b3d
commit 2c81c0c293
18 changed files with 409 additions and 89 deletions
+1 -5
View File
@@ -197,13 +197,10 @@ Font.SDL2_ttf = SDL2_ttf
local fontCache = {}
function Font:constructor (path, size, color)
function Font:constructor (path, size)
if not size then
size = 12
end
if not color then
color = { 0, 0, 0, 255 }
end
if not path then
path = REL:gsub('%.', '/') .. 'resource/DejaVuSans.ttf'
end
@@ -222,7 +219,6 @@ function Font:constructor (path, size, color)
end
self.sdlFont = fontCache[key]
self.color = color
end
function Font:setAlignment (align)