mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2024-11-22 01:51:03 +00:00
node.lua: respect "use tracks" setting
This commit is contained in:
parent
60cd315f0b
commit
99624b5d92
1 changed files with 36 additions and 34 deletions
4
node.lua
4
node.lua
|
@ -138,6 +138,7 @@ function node.render()
|
||||||
local track_x = 0
|
local track_x = 0
|
||||||
local track_y = NATIVE_HEIGHT - PADDING*0.3
|
local track_y = NATIVE_HEIGHT - PADDING*0.3
|
||||||
local space_used_for_tracks = 0
|
local space_used_for_tracks = 0
|
||||||
|
if show_track then
|
||||||
for idx = 1, #tracks do
|
for idx = 1, #tracks do
|
||||||
track = tracks[idx]
|
track = tracks[idx]
|
||||||
if track.color ~= json.null then
|
if track.color ~= json.null then
|
||||||
|
@ -175,6 +176,7 @@ function node.render()
|
||||||
track_x = track_x - track_width - PADDING
|
track_x = track_x - track_width - PADDING
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if #schedule == 0 then
|
if #schedule == 0 then
|
||||||
font_text:write(col2, y, "Fetching talks...", TALK_FONT_SIZE, 1, 1, 1, 1)
|
font_text:write(col2, y, "Fetching talks...", TALK_FONT_SIZE, 1, 1, 1, 1)
|
||||||
|
@ -229,7 +231,7 @@ function node.render()
|
||||||
font_text:write(col2 - 15 - PADDING - time_width, y, talk_time, time_size, 1, 1, 1, 1)
|
font_text:write(col2 - 15 - PADDING - time_width, y, talk_time, time_size, 1, 1, 1, 1)
|
||||||
|
|
||||||
-- track
|
-- track
|
||||||
if talk.track ~= json.null and talk.track.color ~= json.null then
|
if show_track and talk.track ~= json.null and talk.track.color ~= json.null then
|
||||||
local r,g,b = parse_rgb(talk.track.color)
|
local r,g,b = parse_rgb(talk.track.color)
|
||||||
resource.create_colored_texture(r,g,b,1):draw(col2 - 5 - PADDING, y, col2 - 10, y + #title_lines*TALK_FONT_SIZE + 3 + #info_lines*info_size)
|
resource.create_colored_texture(r,g,b,1):draw(col2 - 5 - PADDING, y, col2 - 10, y + #title_lines*TALK_FONT_SIZE + 3 + #info_lines*info_size)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue