scenes/maps: improve level name drawing
This commit is contained in:
parent
56f75da37e
commit
f3d6da0271
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue