mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
Fix text alignment on signs
This commit is contained in:
parent
2b2e73bf98
commit
b57ffe9d12
1 changed files with 3 additions and 3 deletions
|
@ -18,8 +18,8 @@ else
|
||||||
end
|
end
|
||||||
|
|
||||||
-- CONSTANTS
|
-- CONSTANTS
|
||||||
local SIGN_WIDTH = 110
|
local SIGN_WIDTH = 115
|
||||||
local SIGN_PADDING = 8
|
local SIGN_PADDING = 14
|
||||||
|
|
||||||
local LINE_LENGTH = 16
|
local LINE_LENGTH = 16
|
||||||
local NUMBER_OF_LINES = 4
|
local NUMBER_OF_LINES = 4
|
||||||
|
@ -94,7 +94,7 @@ local generate_line = function(s, ypos)
|
||||||
width = width - 1
|
width = width - 1
|
||||||
|
|
||||||
local texture = ""
|
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
|
for i = 1, #parsed do
|
||||||
texture = texture..":"..xpos..","..ypos.."="..parsed[i]..".png"
|
texture = texture..":"..xpos..","..ypos.."="..parsed[i]..".png"
|
||||||
xpos = xpos + CHAR_WIDTH + 1
|
xpos = xpos + CHAR_WIDTH + 1
|
||||||
|
|
Loading…
Reference in a new issue