2006-02-02, 18:33
Quote:##################################################################
# basic onscreen clock
# coded by koshatul ([email protected])
##################################################################
import xbmc, xbmcgui, time
from string import *
updatedelay = 3 # second between updates
class koshclock(xbmcgui.windowdialog):
def (self):
xbmc.output("init screenclock : " + koshclocktime + "\n")
self.callerid = xbmcgui.controllabel(40, 25, 175, 96, koshclocktime, 'font13', '0xffffffff')
self.addcontrol(self.callerid)
xbmc.output("made callerid\n")
def settime(self):
xbmc.output("settime called : " + koshclocktime + "\n")
self.callerid.setlabel(koshclocktime)
xbmc.output("settime finished\n")
def onaction(self, action):
self.close()
koshclocktime = ""
screenclock = koshclock()
while 1:
xbmc.output("tick\n")
if xbmc.player().isplayingvideo():
koshclocktime = str(time.strftime("%h:%m"))
xbmc.output("set time : " + koshclocktime + "\n")
screenclock.show()
screenclock.settime()
xbmc.output("show screenclock\n")
else:
screenclock.close()
xbmc.output("hide screenclock\n")
sleep(updatedelay)
del screenclock
i'm trying to make a "clock" script to show aclock in the top corner (similar to what you see on tv shows in the morning)
two things are bugging me, is it possible to make a window that only displays when the video is fullscreen and doesn't receive actions/events ?
and is it possible to change the font size, or possibly create my own super large number only font ?
thanks,
kosh