
Heartbeat
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
paolopan83
14 years ago
#heartbeat
import karamba
imageFiles = [
"pics/Station100.png",
"pics/Station101.png",
"pics/Station102.png",
"pics/Station103.png",
"pics/Station104.png",
"pics/Station105.png",
"pics/Station106.png",
"pics/Station107.png",
"pics/Station108.png",
"pics/Station109.png",
"pics/Station110.png",
"pics/Station111.png",
"pics/Station112.png",
"pics/Station111.png",
"pics/Station110.png",
"pics/Station109.png",
"pics/Station108.png",
"pics/Station107.png",
"pics/Station106.png",
"pics/Station107.png",
"pics/Station108.png",
"pics/Station109.png",
"pics/Station110.png",
"pics/Station111.png",
"pics/Station112.png",
"pics/Station111.png",
"pics/Station110.png",
"pics/Station109.png",
"pics/Station108.png",
"pics/Station107.png",
"pics/Station106.png",
"pics/Station105.png",
"pics/Station104.png",
"pics/Station103.png",
"pics/Station102.png",
"pics/Station101.png",
]
images = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
image = 0
init = 0
###PAOLO###
#The sizes of the biggest image
MaxX=120
MaxY=129
###/PAOLO###
def initWidget(widget):
#buggy in current version
pass
def widgetUpdated(widget):
global imageFiles
global images
global image
global init
if init == 0:
for i in range(36):
images[i] = karamba.createImage(widget, 150, 150, imageFiles[i])
karamba.moveImage(widget, images[0], 0, 0)
init = 1
else:
karamba.moveImage(widget, images[image], 150, 150)
if image < 35:
image = image + 1
else:
image = 0
###PAOLO###
x=(MaxX-karamba.getImageWidth(widget,images[image]))/2
y=(MaxY-karamba.getImageHeight(widget,images[image]))/2
karamba.moveImage(widget, images[image], x, y)
###PAOLO###
karamba.redrawWidget(widget)
def widgetClicked(widget, x, y, button):
pass
def widgetMouseMoved(widget, x, y, button):
pass
# This will be printed when the widget loads.
print "Loaded my python extension!"
If you need I will email you the code (the tabs are all flatten, grrr).
Write me at paolopantaleo -at- gmail -dot- com
Report
ciasa
14 years ago
Report
burgarello
14 years ago
done
Report