mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2024-11-22 01:51:03 +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
|
local y = 0
|
||||||
for line in string.gmatch(info_text.."\n", "([^\n]*)\n") do
|
for line in string.gmatch(info_text.."\n", "([^\n]*)\n") do
|
||||||
local lines = wrap(
|
if line ~= "" then
|
||||||
line,
|
local lines = wrap(
|
||||||
font_text, font_size, a.width
|
line,
|
||||||
)
|
font_text, font_size, a.width
|
||||||
|
)
|
||||||
|
|
||||||
for idx = 1, #lines do
|
for idx = 1, #lines do
|
||||||
local x = 0
|
local x = 0
|
||||||
local w = font_text:width(lines[idx], font_size)
|
local w = font_text:width(lines[idx], font_size)
|
||||||
|
|
||||||
if align == "right" then
|
if align == "right" then
|
||||||
x = a.width - w
|
x = a.width - w
|
||||||
elseif align == "center" then
|
elseif align == "center" then
|
||||||
x = (a.width - w) / 2
|
x = (a.width - w) / 2
|
||||||
|
end
|
||||||
|
|
||||||
|
text(font_text, x, y, lines[idx], font_size, rgba(default_color,.8))
|
||||||
|
y = y + font_size
|
||||||
end
|
end
|
||||||
|
else
|
||||||
text(font_text, x, y, lines[idx], font_size, rgba(default_color,.8))
|
y = y + font_size*0.5
|
||||||
y = y + font_size
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue