scenes/maps: improve level name drawing

This commit is contained in:
Kazhnuz 2019-03-09 17:33:01 +01:00
parent 56f75da37e
commit f3d6da0271
2 changed files with 7 additions and 1 deletions

View File

@ -17,6 +17,8 @@ function WorldMap:new()
self.cursor.dotAtPoint = nil
self:addLevels()
self.assets:addFont("small", "assets/fonts/PixelOperator.ttf", 15)
self:register()
end

View File

@ -22,7 +22,11 @@ end
function LevelDot:drawName()
local _, w, h = 0, core.screen:getDimensions()
love.graphics.printf(self.data.name, 0, h-16, w, "center")
self.scene.assets.fonts["small"]:set()
love.graphics.setColor(0, 0, 0, .4)
love.graphics.rectangle("fill", 0, h-16, w, 13)
utils.graphics.resetColor()
love.graphics.printf(self.data.name, 0, h-18, w, "center")
end
return LevelDot