From b57ffe9d12f34b4d354d12476a751eceafbc3272 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 25 Jul 2017 01:33:06 +0200 Subject: [PATCH] Fix text alignment on signs --- mods/ITEMS/signs/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/signs/init.lua b/mods/ITEMS/signs/init.lua index bbcc270be8..1064f3d406 100644 --- a/mods/ITEMS/signs/init.lua +++ b/mods/ITEMS/signs/init.lua @@ -18,8 +18,8 @@ else end -- CONSTANTS -local SIGN_WIDTH = 110 -local SIGN_PADDING = 8 +local SIGN_WIDTH = 115 +local SIGN_PADDING = 14 local LINE_LENGTH = 16 local NUMBER_OF_LINES = 4 @@ -94,7 +94,7 @@ local generate_line = function(s, ypos) width = width - 1 local texture = "" - local xpos = math.floor((SIGN_WIDTH - 2 * SIGN_PADDING - width) / 2 + SIGN_PADDING) + local xpos = math.floor((SIGN_WIDTH - SIGN_PADDING - width) / 2) for i = 1, #parsed do texture = texture..":"..xpos..","..ypos.."="..parsed[i]..".png" xpos = xpos + CHAR_WIDTH + 1