import time
import obs #load the Open broadcaster software python api
ScriptInfo = {
'Name':"clock demo",
'Version':'0.0.1',
'refresh':1, #execute the loop funcion once a second
'size':(30,250), #sett the windows size of 30px by 250px
}
class demoClock:
def __init__(self,screen):
self.screen = screen
self.collor = 'ffff00' #set collor to yellow
self.font = self.screen.loadfont('demo.tff',25) #load a demo font and set the font size to 25
def loop(self)
time = time.strftime("%H:%M:%S") #get system time and confert to HH:MM:SS
self.screen.print(time,(2,2),self.font,self.collor) #print text on screen and
self.screen.flip() #Update the stram
obs.AddNewSource(ingameclock,demoClock)