diff options
author | krebs <krebs@fuerkrebs> | 2011-10-16 14:17:58 -0400 |
---|---|---|
committer | krebs <krebs@fuerkrebs> | 2011-10-16 14:17:58 -0400 |
commit | 02970ae5b7bbf7be95e46b4370be0e0388e31b12 (patch) | |
tree | ed2cfecfeb10d97666f5e89eed42c262034544bc /streichelzoo/streichelzoo.py | |
parent | bd6d4661a2c0fb7b8c5151f772470a790b7071dc (diff) | |
parent | 691e77d4e0c55bffa1f8c6ecc761d3de9b30062d (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'streichelzoo/streichelzoo.py')
-rw-r--r-- | streichelzoo/streichelzoo.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/streichelzoo/streichelzoo.py b/streichelzoo/streichelzoo.py new file mode 100644 index 00000000..25b83964 --- /dev/null +++ b/streichelzoo/streichelzoo.py @@ -0,0 +1,31 @@ +#! /bin/python +from libavg import * + +#This function is a slightly modified version of cmiles code from dev.c-base.org/c_leuse/c_leuse.git +#It takes a bunch of word nodes an slides them from left to right just as the HTML <marquee> function +line = 16 +def welcomeScroll(): + global line + line += 1 + textNode = player.getElementByID("welcometext") + if line >= textNode.getNumChildren(): + line = 0 + node = textNode.getChild(line) + LinearAnim(node, "x", 11500, 1200, -1400, -1000, None, welcomeScroll).start() +# +def start_lightcontrol(event): + mainwindow = player.getElementByID("mainwindow") + lightcontrolwindow = player.getElementByID("lightcontrol") + mainwindow.active =False + lightcontrolwindow.active =True + + +player = avg.Player.get() +player.loadFile("main.avg") + +player.setTimeout(10, welcomeScroll) +player.getElementByID("light").setEventHandler(avg.CURSORDOWN, avg.MOUSE, start_lightcontrol) +#player.getElementByID("roster").setEventHandler(avg.CURSORDOWN, avg.MOUSE, buttondown) +#player.getElementByID("blank").setEventHandler(avg.CURSORDOWN, avg.MOUSE, buttondown) +player.play() + |