B:BD[
2.1574] → [
2.1574:1674]
love.graphics.print(p.name, Drawing.pixels(p.x)+16+5,Drawing.pixels(p.y)+line.y+5, 0, Zoom)
local x,y = Drawing.pixels(p.x)+16+5, Drawing.pixels(p.y)+line.y+5
love.graphics.print(p.name, x,y, 0, Zoom)
if Current_drawing_mode == 'name' and i == line.pending.target_point then
-- create a faint red box for the name
love.graphics.setColor(1,0,0,0.1)
local name_text
if p.name == '' then
name_text = love.graphics.newText(love.graphics.getFont(), 'm') -- 1em
else
name_text = love.graphics.newText(love.graphics.getFont(), p.name)
end
love.graphics.rectangle('fill', x,y, math.floor(name_text:getWidth()*Zoom), math.floor(15*Zoom))
end