Weiter hübsch gemacht

This commit is contained in:
baldo 2015-09-09 20:02:40 +02:00
parent 9e8c31dbd1
commit e81424757c
5 changed files with 26 additions and 33 deletions

Binary file not shown.

Binary file not shown.

View file

@ -4,10 +4,8 @@
}, },
"rooms": { "rooms": {
"attraktor": { "attraktor": {
"dect": "",
"translation": "",
"twitter": "#ffnord", "twitter": "#ffnord",
"irc": "#ffnord", "irc": "irc://irc.hackint.org/#ffnord",
"texture": "marble", "texture": "marble",
"speed": 70 "speed": 70
} }

View file

@ -49,7 +49,7 @@ function check_next_talk()
end end
for room, talk in pairs(room_next) do for room, talk in pairs(room_next) do
talk.lines = wrap(talk.title, 30) talk.lines = wrap(talk.title, 40)
end end
if room_next[saal] then if room_next[saal] then
@ -182,10 +182,10 @@ function switcher(screens)
end end
content = switcher{ content = switcher{
--[[ { {
time = 10; time = 20;
draw = function() draw = function()
font:write(400, 200, "Other rooms", 80, 1,1,1,1) redU(400, 200, "Other rooms", 80)
white:draw(0, 300, WIDTH, 302, 0.6) white:draw(0, 300, WIDTH, 302, 0.6)
y = 320 y = 320
local time_sep = false local time_sep = false
@ -204,16 +204,16 @@ content = switcher{
if not time_sep then if not time_sep then
alpha = 0.3 alpha = 0.3
end end
font:write(30, y, talk.start, 50, 1,1,1,alpha) blueU(30, y, talk.start, 50)
font:write(190, y, talk.place, 50, 1,1,1,alpha) redU(190, y, talk.place, 50)
font:write(400, y, talk.lines[math.floor((sys.now()/2) % #talk.lines)+1], 50, 1,1,1,alpha) yellow(450, y, talk.lines[math.floor((sys.now()/2) % #talk.lines)+1], 50)
y = y + 60 y = y + 60
end end
else else
font:write(400, 330, "No other talks.", 50, 1,1,1,1) yellow(400, 330, "No other talks.", 50, 1,1,1,1)
end end
end end
}, --]] { }, {
time = 30; time = 30;
draw = function() draw = function()
if not current_talk then if not current_talk then
@ -245,33 +245,28 @@ content = switcher{
end end
end end
end end
}, --[[ { }, {
time = 10; time = 10;
draw = function(t) draw = function(t)
font:write(400, 200, "Room info", 80, 1,1,1,1) redU(400, 200, "Info", 80)
white:draw(0, 300, WIDTH, 302, 0.6) white:draw(0, 300, WIDTH, 302, 0.6)
font:write(30, 320, "Audio", 50, 1,1,1,1)
font:write(400, 320, "Dial " .. room.dect, 50, 1,1,1,1)
font:write(30, 380, "Translation", 50, 1,1,1,1) blueU(30, 320, "IRC", 50)
font:write(400, 380, "Dial " .. room.translation, 50, 1,1,1,1) yellow(400, 320, room.irc, 50)
font:write(30, 480, "IRC", 50, 1,1,1,1) blueU(30, 380, "Twitter", 50)
font:write(400, 480, room.irc, 50, 1,1,1,1) yellow(400, 380, room.twitter, 50)
font:write(30, 540, "Twitter", 50, 1,1,1,1) --[[
font:write(400, 540, room.twitter, 50, 1,1,1,1) blueU(30, 480, "Audio", 50)
yellow(400, 480, "Dial " .. room.irc, 50)
if t then blueU(30, 540, "Translation", 50)
local banner = -4 + t yellow(400, 540, "Dial " .. room.twitter, 50)
if banner > 0 and banner < 3.1412 then --]]
local alpha = math.pow(math.sin(banner), 2)
local x = 400 - math.pow(banner / math.pi - 0.5, 5) * WIDTH * 2
font:write(x, 640, "http://info-beamer.org/", 30, 1,1,1,alpha)
end
end
end end
}, --]] },
} }
function redU(x, y, text, size) function redU(x, y, text, size)

View file

@ -9,7 +9,7 @@ from datetime import datetime, date
diff = None diff = None
# Fake time in UTC # Fake time in UTC
diff = datetime(2015,9,11,8,30,00) - datetime.utcnow() diff = datetime(2015,9,11,7,29,00) - datetime.utcnow()
met = pytz.timezone("Europe/Berlin") met = pytz.timezone("Europe/Berlin")
def current_time(): def current_time():
@ -29,7 +29,7 @@ def send(data):
print >>sys.stderr, "SENT >>> ", data print >>sys.stderr, "SENT >>> ", data
def send_clock(now, ts): def send_clock(now, ts):
day = (now.date() - date(2015, 9, 11)).days day = (now.date() - date(2015, 9, 10)).days
since_midnight = ( since_midnight = (
now - now -
now.replace(hour=0, minute=0, second=0, microsecond=0) now.replace(hour=0, minute=0, second=0, microsecond=0)