mirror of
https://github.com/minetest-mods/digilines.git
synced 2025-07-01 16:00:22 +02:00
fix doubled padding
was leading to offset of lcd content to the right
This commit is contained in:
2
lcd.lua
2
lcd.lua
@ -87,7 +87,7 @@ local generate_line = function(s, ypos)
|
|||||||
width = width - 1
|
width = width - 1
|
||||||
|
|
||||||
local texture = ""
|
local texture = ""
|
||||||
local xpos = math.floor((LCD_WIDTH - 2 * LCD_PADDING - width) / 2 + LCD_PADDING)
|
local xpos = math.floor((LCD_WIDTH - 2 * LCD_PADDING - width) / 2)
|
||||||
for ii = 1, #parsed do
|
for ii = 1, #parsed do
|
||||||
texture = texture..":"..xpos..","..ypos.."="..parsed[ii]..".png"
|
texture = texture..":"..xpos..","..ypos.."="..parsed[ii]..".png"
|
||||||
xpos = xpos + CHAR_WIDTH + 1
|
xpos = xpos + CHAR_WIDTH + 1
|
||||||
|
Reference in New Issue
Block a user