mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2024-12-22 08:12:44 +00:00
room specific text: actually render empty lines
This commit is contained in:
parent
5f98771957
commit
d908c361f8
1 changed files with 18 additions and 14 deletions
32
tile.lua
32
tile.lua
|
@ -493,23 +493,27 @@ local function view_info(starts, ends, config, x1, y1, x2, y2)
|
|||
|
||||
local y = 0
|
||||
for line in string.gmatch(info_text.."\n", "([^\n]*)\n") do
|
||||
local lines = wrap(
|
||||
line,
|
||||
font_text, font_size, a.width
|
||||
)
|
||||
if line ~= "" then
|
||||
local lines = wrap(
|
||||
line,
|
||||
font_text, font_size, a.width
|
||||
)
|
||||
|
||||
for idx = 1, #lines do
|
||||
local x = 0
|
||||
local w = font_text:width(lines[idx], font_size)
|
||||
for idx = 1, #lines do
|
||||
local x = 0
|
||||
local w = font_text:width(lines[idx], font_size)
|
||||
|
||||
if align == "right" then
|
||||
x = a.width - w
|
||||
elseif align == "center" then
|
||||
x = (a.width - w) / 2
|
||||
if align == "right" then
|
||||
x = a.width - w
|
||||
elseif align == "center" then
|
||||
x = (a.width - w) / 2
|
||||
end
|
||||
|
||||
text(font_text, x, y, lines[idx], font_size, rgba(default_color,.8))
|
||||
y = y + font_size
|
||||
end
|
||||
|
||||
text(font_text, x, y, lines[idx], font_size, rgba(default_color,.8))
|
||||
y = y + font_size
|
||||
else
|
||||
y = y + font_size*0.5
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue