Пример #1
0
        def __init__( self, *args, **kwargs):
            
            self.getTitle = kwargs.get('title')
            self.getPlot = kwargs.get('plot')
            self.getInfo = kwargs.get('info')
            self.getThumbnail = kwargs.get('thumbnail')
            self.getFanart = kwargs.get('fanart')
            self.getQuit = kwargs.get('quit')

            self.background = xbmcgui.ControlImage( 70, 20, 1150, 630, 'http://s6.postimg.org/58jknrvtd/backgroundventana5.png')
            self.title = xbmcgui.ControlTextBox(140, 60, 1130, 50)
            self.quit = xbmcgui.ControlTextBox(145, 90, 1030, 45)
            self.plot = xbmcgui.ControlTextBox( 120, 150, 1056, 140 )
            self.info = xbmcgui.ControlFadeLabel(120, 310, 1056, 100)
            self.thumbnail = xbmcgui.ControlImage( 813, 43, 390, 100, self.getThumbnail )
            self.fanart = xbmcgui.ControlImage( 120, 365, 1060, 250, self.getFanart )
            
            self.addControl(self.background)
            self.addControl(self.title)
            self.addControl(self.quit)
            self.addControl(self.plot)
            self.addControl(self.thumbnail)
            self.addControl(self.fanart)
            self.addControl(self.info)
            
            self.title.setText( self.getTitle )
            self.quit.setText( self.getQuit )
            try:
                self.plot.autoScroll(7000,6000,30000)
            except:
                print "Actualice a la ultima version de kodi para mejor info"
                import xbmc
                xbmc.executebuiltin('Notification(bbcode_kodi2html([COLOR red][B]Actualiza Kodi a su última versión[/B][/COLOR]), bbcode_kodi2html([COLOR skyblue]para mejor info[/COLOR]),8000,"https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/kodi-icon.png")')
            self.plot.setText(  self.getPlot )
            self.info.addLabel(self.getInfo)
Пример #2
0
			def __init__(self):
				# MAIN WINDOW
				self.window = xbmcgui.ControlImage(x=0, y=0, width=1280, height=720, filename=fanart, aspectRatio=0, colorDiffuse='0xFF666666')
				self.addControl(self.window)
				# IMAGE
				self.imageWindow = xbmcgui.ControlImage(x=47, y=47, width=306, height=406, filename=os.path.join(addonDir, 'resources/images/white.png'), aspectRatio=0, colorDiffuse='0x55FFFFFF')
				self.addControl(self.imageWindow)
				self.image = xbmcgui.ControlImage(x=50, y=50, width=300, height=400, filename=image, aspectRatio=1)
				self.addControl(self.image)
				# TEXT
				self.title = xbmcgui.ControlLabel(x=400, y=50, width=830, height=50, label=title, font='Volume', textColor='0xFFFFFFFF', alignment=0)
				self.addControl(self.title)
				self.textboxWindow = xbmcgui.ControlImage(x=400, y=125, width=830, height=175, filename=os.path.join(addonDir, 'resources/images/black.png'), aspectRatio=0, colorDiffuse='0x88444444')
				self.addControl(self.textboxWindow)
				self.textbox1 = xbmcgui.ControlTextBox(x=425, y=140, width=780, height=145, font='Details', textColor='0xFF00FFFF')
				self.addControl(self.textbox1)
				self.textbox1.setText(info2)
				self.textbox1.autoScroll(2500, 2500, 2500)
				self.textbox2 = xbmcgui.ControlTextBox(x=400, y=325, width=830, height=345, font='size22', textColor='0xFFFFFFFF')
				self.addControl(self.textbox2)
				self.textbox2.setText(desc)
				self.textbox2.autoScroll(2500, 2500, 2500)
				# BUTTON
				if xbmc.getSkinDir() == 'skin.estuary':
					self.button1 = xbmcgui.ControlButton(x=50, y=500, width=300, height=50, label='Xem | Watch', focusTexture=os.path.join(addonDir, 'resources/images/white.png'), noFocusTexture=os.path.join(addonDir, 'resources/images/white.png'), font='font36_title', textColor ='0xFF222222', alignment=6, disabledColor='0xFF222222', focusedColor='0xFF222222')
				else:
					self.button1 = xbmcgui.ControlButton(x=50, y=500, width=300, height=50, label='XEM', font='InfoTitle', alignment=6)
				self.addControl(self.button1)
				self.setFocus(self.button1)
Пример #3
0
		def __init__(self,L=0,T=0,W=1280,H=720,TxtColor='0xFFFFFFFF',Font='font12',BorderWidth=10):
			image_path = os.path.join(ART, 'ContentPanel.png')
			self.border = xbmcgui.ControlImage(L,T,W,H, image_path)
			self.addControl(self.border); 
			self.BG=xbmcgui.ControlImage(L+BorderWidth,T+BorderWidth,W-(BorderWidth*2),H-(BorderWidth*2), FANART, aspectRatio=0, colorDiffuse='0x9FFFFFFF')
			self.addControl(self.BG)
			title = cr+ADDONTITLE+cr2
			times = int(float(Font[-2:]))
			temp = title.replace('[', '<').replace(']', '>')
			temp = re.sub('<[^<]+?>', '', temp)
			title_width = len(str(temp))*(times - 1)
			title = THEME % title
			self.title=xbmcgui.ControlTextBox(L+(W-title_width)/2,T+BorderWidth,title_width,30,font='font14',textColor='0xFF1E90FF')
			self.addControl(self.title)
			self.title.setText(title)
			msg   = "Currently no build installed from %s.\n\nSelect 'Build Menu' to install a Build or 'Ignore' to never see this message again.\n\nThank you for choosing %s." % (cr+ADDONTITLE+cr2, cr+ADDONTITLE+cr2)
			msg   = THEME % msg
			self.TxtMessage=xbmcgui.ControlTextBox(L+(BorderWidth*2),T+30+BorderWidth,W-(BorderWidth*4),H-(BorderWidth*2)-75,font=Font,textColor=TxtColor)
			self.addControl(self.TxtMessage)
			self.TxtMessage.setText(msg)
			focus=os.path.join(ART, 'button-focus_lightblue.png'); nofocus=os.path.join(ART, 'button-focus_grey.png')
			w1        = int((W-(BorderWidth*5))/3); h1 = 35
			t         = int(T+H-h1-(BorderWidth*1.5))
			save      = int(L+(BorderWidth*1.5))
			buildmenu = int(save+w1+BorderWidth)
			ignore    = int(buildmenu+w1+BorderWidth)
			self.buttonSAVEMENU=xbmcgui.ControlButton(save,t,w1,h1,"Save Data Menu",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus)
			self.buttonBUILDMENU=xbmcgui.ControlButton(buildmenu,t,w1,h1,"Build Menu",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus)
			self.buttonIGNORE=xbmcgui.ControlButton(ignore,t,w1,h1,"Ignore",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus)
			self.addControl(self.buttonSAVEMENU); self.addControl(self.buttonBUILDMENU); self.addControl(self.buttonIGNORE)
			self.buttonIGNORE.controlLeft(self.buttonBUILDMENU); self.buttonIGNORE.controlRight(self.buttonSAVEMENU)
			self.buttonBUILDMENU.controlLeft(self.buttonSAVEMENU); self.buttonBUILDMENU.controlRight(self.buttonIGNORE)
			self.buttonSAVEMENU.controlLeft(self.buttonIGNORE); self.buttonSAVEMENU.controlRight(self.buttonBUILDMENU)
			self.setFocus(self.buttonIGNORE)
Пример #4
0
 def __init__( self, *args, **kwargs):
     
     self.getTitle = kwargs.get('title')
     self.getPlot = kwargs.get('plot')
     self.getInfo = kwargs.get('info')
     self.getThumbnail = kwargs.get('thumbnail')
     self.getFanart = kwargs.get('fanart')
 
     self.background = xbmcgui.ControlImage( 70, 20, 1150, 630, 'http://s6.postimg.org/58jknrvtd/backgroundventana5.png')
     self.title = xbmcgui.ControlTextBox(140, 60, 1130, 50)
     self.plot = xbmcgui.ControlTextBox( 120, 150, 1056, 140 )
     self.info = xbmcgui.ControlFadeLabel(120, 310, 1056, 100)
     self.thumbnail = xbmcgui.ControlImage( 813, 43, 390, 100, self.getThumbnail )
     self.fanart = xbmcgui.ControlImage( 120, 365, 1060, 250, self.getFanart )
 
     self.addControl(self.background)
     self.addControl(self.title)
     self.addControl(self.plot)
     self.addControl(self.thumbnail)
     self.addControl(self.fanart)
     self.addControl(self.info)
     
     self.title.setText( self.getTitle )
     self.plot.autoScroll(7000,6000,30000)
     self.plot.setText(  self.getPlot )
     self.info.addLabel(self.getInfo)
Пример #5
0
 def __init__(self,
              msg='',
              L=0,
              T=0,
              W=1280,
              H=720,
              TxtColor='0xFFFFFFFF',
              Font='font12',
              BorderWidth=10):
     image_path = os.path.join(ART, 'ContentPanel.png')
     self.border = xbmcgui.ControlImage(L, T, W, H, image_path)
     self.addControl(self.border)
     self.BG = xbmcgui.ControlImage(L + BorderWidth,
                                    T + BorderWidth,
                                    W - (BorderWidth * 2),
                                    H - (BorderWidth * 2),
                                    FANART,
                                    aspectRatio=0,
                                    colorDiffuse='0x5FFFFFFF')
     self.addControl(self.BG)
     #title
     title = ADDONTITLE
     times = int(float(Font[-2:]))
     temp = title.replace('[', '<').replace(']', '>')
     temp = re.sub('<[^<]+?>', '', temp)
     title_width = len(str(temp)) * (times - 1)
     title = THEME3 % title
     self.title = xbmcgui.ControlTextBox(L + (W - title_width) / 2,
                                         T + BorderWidth,
                                         title_width,
                                         30,
                                         font='font14',
                                         textColor='0xFF1E90FF')
     self.addControl(self.title)
     self.title.setText(title)
     #icon
     self.Icon = xbmcgui.ControlImage(L + (BorderWidth * 2),
                                      T + BorderWidth + 40,
                                      150,
                                      150,
                                      ICON,
                                      aspectRatio=0,
                                      colorDiffuse='0xAFFFFFFF')
     self.addControl(self.Icon)
     #welcome message
     msg = THEME2 % msg
     self.TxtMessage = xbmcgui.ControlTextBox(
         L + 160 + (BorderWidth * 3),
         T + 45,
         W - 170 - (BorderWidth * 3),
         H - (BorderWidth * 2) - 50,
         font=Font,
         textColor=TxtColor)
     self.addControl(self.TxtMessage)
     self.TxtMessage.setText(msg)
Пример #6
0
		def __init__(self,L=0,T=0,W=1280,H=720,TxtColor='0xFFFFFFFF',Font='font14',BorderWidth=10):
			if BUILDNAME == "" or not wiz.checkBuild(BUILDNAME, 'version'):
				bgArt   = ICON
				icon    = ICON
				build   = "Test Window"
				version = '1.0'
				latest  = '1.0'
			else:
				bgArt   = wiz.checkBuild(BUILDNAME, 'fanart')
				icon    = wiz.checkBuild(BUILDNAME, 'icon')
				build   = BUILDNAME
				version = BUILDVERSION
				latest  = wiz.checkBuild(BUILDNAME, 'version')
			image_path = os.path.join(ART, 'ContentPanel.png')
			self.border = xbmcgui.ControlImage(L,T,W,H, image_path)
			self.addControl(self.border); 
			self.BG=xbmcgui.ControlImage(L+BorderWidth, T+BorderWidth, W-(BorderWidth*2), H-(BorderWidth*2), bgArt, aspectRatio=0, colorDiffuse='0x5FFFFFFF')
			self.addControl(self.BG)
			#title
			times = int(float(Font[-2:]))
			title = ADDONTITLE
			temp = title.replace('[', '<').replace(']', '>')
			temp = re.sub('<[^<]+?>', '', temp)
			title_width = len(str(temp))*(times - 1)
			title   = THEME2 % title
			self.title=xbmcgui.ControlTextBox(L+(W-title_width)/2,T+BorderWidth,title_width,30,font='font14',textColor='0xFF1E90FF')
			self.addControl(self.title)
			self.title.setText(title)
			#update
			if version < latest: msg = "Update avaliable for installed build:\n[COLOR %s]%s[/COLOR]\n\nCurrent Version: v[COLOR %s]%s[/COLOR]\nLatest Version: v[COLOR %s]%s[/COLOR]\n\n[COLOR %s]*Recommened: Fresh install[/COLOR]" % (COLOR1, build, COLOR1, version, COLOR1, latest, COLOR1)
			else: msg = "Running latest version of installed build:\n[COLOR %s]%s[/COLOR]\n\nCurrent Version: v[COLOR %s]%s[/COLOR]\nLatest Version: v[COLOR %s]%s[/COLOR]\n\n[COLOR %s]*Recommended: Fresh install[/COLOR]" % (COLOR1, build, COLOR1, version, COLOR1, latest, COLOR1)
			msg = THEME2 % msg
			self.update=xbmcgui.ControlTextBox(L+(BorderWidth*2),T+BorderWidth+30,W-150-(BorderWidth*3),H-(BorderWidth*2)-30,font=Font,textColor=TxtColor)
			self.addControl(self.update)
			self.update.setText(msg)
			#icon
			self.Icon=xbmcgui.ControlImage(L+W-(BorderWidth*2)-150, T+BorderWidth+35, 150, 150, icon, aspectRatio=0, colorDiffuse='0xAFFFFFFF')
			self.addControl(self.Icon)
			#buttons
			focus, nofocus = artwork('button')
			w1      = int((W-(BorderWidth*5))/3); h1 = 35
			t       = int(T+H-h1-(BorderWidth*1.5))
			fresh   = int(L+(BorderWidth*1.5))
			normal  = int(fresh+w1+BorderWidth)
			ignore  = int(normal+w1+BorderWidth)
			
			self.buttonFRESH=xbmcgui.ControlButton(fresh,t, w1,h1,"Fresh Install",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus)
			self.buttonNORMAL=xbmcgui.ControlButton(normal,t,w1,h1,"Normal Install",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus)
			self.buttonIGNORE=xbmcgui.ControlButton(ignore,t,w1,h1,"Ignore 3 days",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus)
			self.addControl(self.buttonFRESH); self.addControl(self.buttonNORMAL); self.addControl(self.buttonIGNORE)
			self.buttonIGNORE.controlLeft(self.buttonNORMAL); self.buttonIGNORE.controlRight(self.buttonFRESH)
			self.buttonNORMAL.controlLeft(self.buttonFRESH); self.buttonNORMAL.controlRight(self.buttonIGNORE)
			self.buttonFRESH.controlLeft(self.buttonIGNORE); self.buttonFRESH.controlRight(self.buttonNORMAL)
			self.setFocus(self.buttonFRESH)
Пример #7
0
    def __init__(self, *args, **kwargs):
        self.getTitle = kwargs.get('title')
        self.getPlot = kwargs.get('plot')
        self.getThumbnail = kwargs.get('thumbnail')
        self.getFanart = kwargs.get('fanart')
        self.getRating = kwargs.get('rating')

        self.background = xbmcgui.ControlImage(70, 20, 1150, 630, 'http://imgur.com/K6wduMe.png')
        self.title = xbmcgui.ControlTextBox(120, 60, 430, 50)
        self.rating = xbmcgui.ControlTextBox(145, 112, 1030, 45)
        self.plot = xbmcgui.ControlTextBox(120, 150, 1056, 100)
        self.thumbnail = xbmcgui.ControlImage(120, 300, 1056, 300, self.getThumbnail)
        self.fanart = xbmcgui.ControlImage(780, 43, 390, 100, self.getFanart)

        self.addControl(self.background)
        self.background.setAnimations(
            [('conditional', 'effect=slide start=1000% end=0% time=1500 condition=true tween=bounce',),
             ('WindowClose', 'effect=slide delay=800 start=0% end=1000%  time=800 condition=true',)])
        self.addControl(self.thumbnail)
        self.thumbnail.setAnimations([('conditional',
                                       'effect=zoom  start=0% end=100% delay=2700 time=1500 condition=true tween=elastic easing=inout',),
                                      ('WindowClose', 'effect=slide end=0,700%   time=300 condition=true',)])
        self.addControl(self.plot)
        self.plot.setAnimations(
            [('conditional', 'effect=zoom delay=2000 center=auto start=0 end=100  time=800  condition=true  ',), (
            'conditional',
            'effect=rotate  delay=2000 center=auto aceleration=6000 start=0% end=360%  time=800  condition=true',),
             ('WindowClose', 'effect=zoom center=auto start=100% end=-0%  time=600 condition=true',)])
        self.addControl(self.fanart)
        self.fanart.setAnimations(
            [('WindowOpen', 'effect=slide start=0,-700 delay=1000 time=2500 tween=bounce condition=true',), (
            'conditional',
            'effect=rotate center=auto  start=0% end=360% delay=3000 time=2500 tween=bounce condition=true',),
             ('WindowClose', 'effect=slide end=0,-700%  time=1000 condition=true',)])
        self.addControl(self.title)
        self.title.setText(self.getTitle)
        self.title.setAnimations(
            [('conditional', 'effect=slide start=-1500% end=0%  delay=1000 time=2000 condition=true tween=elastic',),
             ('WindowClose', 'effect=slide start=0% end=-1500%  time=800 condition=true',)])
        self.addControl(self.rating)
        self.rating.setText(self.getRating)
        self.rating.setAnimations(
            [('conditional', 'effect=fade start=0% end=100% delay=3000 time=1500 condition=true',),
             ('WindowClose', 'effect=slide end=0,-700%  time=600 condition=true',)])
        xbmc.sleep(200)

        try:
            self.plot.autoScroll(7000, 6000, 30000)
        except:

            xbmc.executebuiltin(
                'Notification([COLOR red][B]Actualiza Kodi a su última versión[/B][/COLOR], [COLOR skyblue]para mejor info[/COLOR],8000,"https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/kodi-icon.png")')
        self.plot.setText(self.getPlot)
Пример #8
0
 def __init__(self, msg='', bgArt='', L=0, T=0, W=1280, H=720, TxtColor='0xFFFFFFFF', Font='font14', BorderWidth=10):
     self.background = bgArt
     self.scr = {'L': L, 'T': T, 'W': W, 'H': H}
     image_path = os.path.join(_1CH.get_path(), 'resources', 'skins', 'Default', 'media', '1CHDialogBack.png')
     self.border = xbmcgui.ControlImage(self.scr['L'], self.scr['T'], self.scr['W'], self.scr['H'], image_path)
     self.addControl(self.border)
     self.BG = xbmcgui.ControlImage(self.scr['L'] + BorderWidth, self.scr['T'] + BorderWidth, self.scr['W'] - (BorderWidth * 2), self.scr['H'] - (BorderWidth * 2), self.background, aspectRatio=0, colorDiffuse='0x2FFFFFFF')
     self.addControl(self.BG)
     self.TxtMessage = xbmcgui.ControlTextBox(self.scr['L'] + BorderWidth, self.scr['T'] + BorderWidth, self.scr['W'] - (BorderWidth * 2), self.scr['H'] - (BorderWidth * 2), font=Font, textColor=TxtColor)
     self.addControl(self.TxtMessage)
     self.TxtMessage.setText(msg)
     counter_width = len(continue_msg) * 11
     self.counter = xbmcgui.ControlTextBox(L + (W - counter_width) / 2, T + H - 30 - BorderWidth, counter_width, 30, font=Font, textColor=TxtColor)
     self.addControl(self.counter)
Пример #9
0
    def __init__(self):
        self.setCoordinateResolution(4)

        # Initialize class variables
        self.typewriter = typewriter.Typewriter()
        self.commandListIndex = 0
        self.commandList = []
        self.promptPos = 0
        self.cursorPos = 0
        self.overwrite = False
        self.multiline = False
        
        # Redirect stdout to print to our client
        self.text = NewOut()
        sys.stdout = self.text
        sys.displayhook = self.text.display

        # Set up the GUI
        self.pic = xbmcgui.ControlImage(0,0,0,0, os.path.join(RootDir, "background.png"))   # (0,0,0,0) Makes it draw the image full size, starting at the top left
        self.addControl(self.pic)
        self.textBox = xbmcgui.ControlTextBox(9,36,686,436)
        self.addControl(self.textBox)

        # Then activate the command prompt
        self.getInput()
        thread.start_new_thread(self.startBlinker, ())
def crearVentanaNegra():
	#creamos una clase de tipo window
	#para definir en el onAction que extraiga los codigos de los botones
	class ventanaNegra(xbmcgui.Window):
		def __init__(self):
			self.contador = 0
			self.maxIntentos = 5

		def onAction(self, action):
			code = action.getButtonCode()
			identificador = action.getId()
			xbmcgui.Dialog().ok("Reconociendo botones ", "Boton reconocido " + str(self.contador) + "/" +str(self.maxIntentos) + "\nCodigo boton " + str(code) + "\nIdentificador boton: " + str(identificador))
			self.contador += 1
			if self.contador >= self.maxIntentos:
				self.close()
			elif code == 61467:
				self.close()

	miVentanaNegra = ventanaNegra()
	titulo = xbmcgui.ControlLabel (300, 100, 700, 50, "COMPROBANDO LOS BOTONES DEL MANDO A DISTANCIA")
	miVentanaNegra.addControl(titulo)
	textBox = xbmcgui.ControlTextBox(300, 200, 500, 200, textColor="0xFFFFFFFF")
	textBox.setVisible(True)
	miVentanaNegra.addControl(textBox)
	textBox.setText("Toque las teclas de su mando a distancia para comprobar que son reconocidos por el sistema\n\nLa pantalla se cerrara automaticamente tras " + str(miVentanaNegra.maxIntentos) + " botones reconocidos")
	miVentanaNegra.doModal()
Пример #11
0
    def onInit(self):
        self.testRun = False

        self.screenx = 1920
        self.screeny = 1080

        self.image_dir = ART
        self.image_background = self.image_dir + '/bg_screen.jpg'
        self.image_shadow = self.image_dir + '/shadowframe.png'
        self.image_progress = self.image_dir + '/ajax-loader-bar.gif'
        self.image_ping = self.image_dir + '/ping_progress_bg.png'
        self.image_ping_glow = self.image_dir + '/ping_progress_glow.png'
        self.image_gauge = self.image_dir + '/gauge_bg.png'
        self.image_gauge_arrow = self.image_dir + '/gauge_ic_arrow.png'
        self.image_button_run = self.image_dir + '/btn_start_bg.png'
        self.image_button_run_glow = self.image_dir + '/btn_start_glow_active.png'
        self.image_speedtestresults = self.image_dir + '/speedtest_results_wtext.png'
        self.image_centertext_testingping = self.image_dir + '/testing_ping.png'
        self.image_result = self.image_speedtestresults
        self.textbox = xbmcgui.ControlTextBox(50,
                                              50,
                                              880,
                                              500,
                                              textColor='0xFFFFFFFF')
        self.addControl(self.textbox)
        self.displayButtonRun()
        self.displayButtonClose()
        self.setFocus(self.button_run)
Пример #12
0
 def __init__(self,
              msg='',
              bgArt='',
              L=0,
              T=0,
              W=1280,
              H=720,
              TxtColor='0xFFFFFFFF',
              Font='font14',
              BorderWidth=10):
     self.background = bgArt
     self.scr['L'] = L
     self.scr['T'] = T
     self.scr['W'] = W
     self.scr['H'] = H
     self.BG = xbmcgui.ControlImage(self.scr['L'],
                                    self.scr['T'],
                                    self.scr['W'],
                                    self.scr['H'],
                                    self.background,
                                    aspectRatio=0)
     self.addControl(self.BG)
     self.TxtMessage = xbmcgui.ControlTextBox(
         self.scr['L'] + BorderWidth,
         self.scr['T'] + BorderWidth,
         self.scr['W'] - (BorderWidth * 2),
         self.scr['H'] - (BorderWidth * 2),
         font=Font,
         textColor=TxtColor)
     self.addControl(self.TxtMessage)
     self.TxtMessage.setText(msg)
Пример #13
0
    def __init__(self, *args, **kwargs):
        global download_thread
        self.header = kwargs['header']
        self.background = kwargs['background']
        self.icon = kwargs['icon']
        self.maintext = kwargs['maintext']

        if not os.path.exists(branding_update):
            self.addControl(
                xbmcgui.ControlImage(
                    0, 0, 1280, 720,
                    addonfolder + 'resources/images/whitebg.jpg'))


#    self.addControl(xbmcgui.ControlImage(0,0,1280,720, addonfolder+'resources/images/'+self.background))
        self.addControl(xbmcgui.ControlImage(0, 0, 1280, 720, branding_update))
        self.updateimage = xbmcgui.ControlImage(
            200, 230, 250, 250, addonfolder + 'resources/images/' + self.icon)
        self.addControl(self.updateimage)
        self.updateimage.setAnimations([(
            'conditional',
            'effect=rotate start=0 end=360 center=auto time=3000 loop=true condition=true',
        )])

        # Add header text
        #    self.strHeader = xbmcgui.ControlLabel(350, 150, 250, 20, '', 'font14','0xFF000000')
        #    self.addControl(self.strHeader)
        #    self.strHeader.setLabel(self.header)
        # Add description text
        if not os.path.exists(branding_update):
            self.strDescription = xbmcgui.ControlTextBox(
                570, 250, 600, 300, 'font14', '0xFF000000')
            self.addControl(self.strDescription)
            self.strDescription.setText(self.maintext)
Пример #14
0
def getVideos3(name1, url):
    if "Status" in name1:
        data = status(url)
        show = xbmcgui.ControlTextBox()
        show.setText(data)
    else:
        content = getUrl(url)
        print "In getVideos3 content B =", content
        regexcat = '\#EXTINF\:(.*?)\\n(.*?)\\n'
        match = re.compile(regexcat, re.DOTALL).findall(content)
        print "In Videos2 match =", match
        icount = 1
        for name, url in match:
            if len(KW) > 0:
                icount = 0
                for key in KW:
                    if key in name.lower():
                        icount = 1
                        break
                if icount == 0:
                    continue
            url1 = url.replace("\r", "")
            url1 = url1.replace("\n", "")
            items = name.split(",")
            name1 = items[1].replace("\r", "")
            name1 = name1.replace("\n", "")

            pic = " "
            addDirectoryItem(name1, {
                "name": name1,
                "url": url1,
                "mode": 4
            }, pic)
        xbmcplugin.endOfDirectory(thisPlugin)
Пример #15
0
    def __init__(self, *args, **kwargs):
        self.header = kwargs['header']
        self.background = kwargs['background']
        self.icon = kwargs['icon']
        self.maintext = kwargs['maintext']

        self.addControl(
            xbmcgui.ControlImage(
                0, 0, 1280, 720,
                os.path.join(ADDON_PATH, 'resources', 'images',
                             'whitebg.jpg')))
        self.updateimage = xbmcgui.ControlImage(
            200, 230, 250, 250,
            os.path.join(ADDON_PATH, 'resources', 'images', self.icon))
        self.addControl(self.updateimage)
        self.updateimage.setAnimations([(
            'conditional',
            'effect=rotate start=0 end=360 center=auto time=3000 loop=true condition=true',
        )])

        # Add description text
        self.strDescription = xbmcgui.ControlTextBox(570, 250, 600, 300,
                                                     'font14', '0xFF000000')
        self.addControl(self.strDescription)
        self.strDescription.setText(self.maintext)
def crearVentanaTexto(nombre, titulo, texto):
	nuevaVentana = crearVentana(nombre, titulo)
	textBox = xbmcgui.ControlTextBox(300, 100, 600, 600, textColor="0xFFFFFFFF")
	textBox.setVisible(True)
	nuevaVentana.addControl(textBox)
	textBox.setText(texto)
	#texto.setText(escribe(30004) + "\n\n" + escribe(30005) + "\n\n" + escribe(30006) + "\n\n" + escribe(30007))
	nuevaVentana.doModal()
Пример #17
0
 def text(self, label="", height=None):
     if not height:
         height = self.__rowh
     elem = xbmcgui.ControlTextBox(0, 0, 0, 0)
     self.__eid += 1
     self.__elems[self.__eid] = ("text", label, self.__null, None, height,
                                 elem)
     return self.__eid
Пример #18
0
 def __init__(self, txt_data):
     self.bgread = xbmc.translatePath(
         os.path.join(os.getcwd().replace(';', ''), 'resources', 'img',
                      'background.png'))
     self.setCoordinateResolution(1)  # 0 for 1080
     self.addControl(xbmcgui.ControlImage(0, 0, 1280, 720, self.bgread))
     self.NewsTextBox = xbmcgui.ControlTextBox(10, 10, 1260, 700)
     self.addControl(self.NewsTextBox)
     self.NewsTextBox.setText(txt_data)
     self.scroll_pos = 0
Пример #19
0
	def __init__(self,msg='',bgArt='',L=0,T=0,W=1280,H=720,TxtColor='0xFFFFFFFF',Font='font14',BorderWidth=10,ImgexitBtn=''):
		self.background=bgArt; self.scr['L']=L; self.scr['T']=T; self.scr['W']=W; self.scr['H']=H; 
		self.BG=xbmcgui.ControlImage(self.scr['L'],self.scr['T'],self.scr['W'],self.scr['H'],self.background,aspectRatio=0,colorDiffuse='0xff00ff00'); 
		self.addControl(self.BG); 
		self.TxtMessage=xbmcgui.ControlTextBox(self.scr['L']+BorderWidth,self.scr['T']+BorderWidth,self.scr['W']-(BorderWidth*2),self.scr['H']-(BorderWidth*2),font=Font,textColor=TxtColor); 
		self.addControl(self.TxtMessage); 
		self.exitBtn=xbmcgui.ControlButton(self.scr['L']+self.scr['W']-13-22,self.scr['T']+10,22,22,"",textColor="0xFFFFFFFF",focusedColor="0xFFFF0000",font="font10",alignment=2,focusTexture=ImgexitBtn,noFocusTexture=ImgexitBtn); 
		self.addControl(self.exitBtn); 
		self.TxtMessage.setText(msg); 
		self.setFocus(self.exitBtn)
Пример #20
0
		def __init__(self,msg='',L=0,T=0,W=1280,H=720,TxtColor='0xFFFFFFFF',Font='font10',BorderWidth=10):
			buttonfocus, buttonnofocus = artwork('button')
			self.BG=xbmcgui.ControlImage(L+BorderWidth,T+BorderWidth,W-(BorderWidth*2),H-(BorderWidth*2), FANART, aspectRatio=0)
			self.addControl(self.BG)
			top = T+BorderWidth
			leftside = L+BorderWidth
			rightside = L+(W/2)-(BorderWidth*2)
			
			header = '[COLOR lime]Brzo konfiguriranje naprednih postavki[/COLOR]'
			self.Header=xbmcgui.ControlLabel(L, top, W, 30, header, font='font13', textColor=TxtColor, alignment=0x00000002)
			self.addControl(self.Header)
			top += 30+BorderWidth
			
			#####Video Cache Size####
			freeMemory = int(float(wiz.getInfo('System.Memory(free)')[:-2])*.33)
			recMemory = int(float(wiz.getInfo('System.Memory(free)')[:-2])*.23)

			self.videomin = 0; self.videomax = freeMemory if freeMemory < 2000 else 2000
			self.recommendedVideo = recMemory if recMemory < 500 else 500; self.currentVideo = self.recommendedVideo
			current1 = '[COLOR lime]Velicina predmomorije videa:[/COLOR]=[COLOR white]%s MB[/COLOR]' % (self.currentVideo)
			recommended1 = '[COLOR lime]Velicina predmemorije videozapisa:[/COLOR] [COLOR white]%s MB[/COLOR]' % (self.recommendedVideo)
			
			####CURL Timeout/CURL Low Speed####
			self.curlmin = 0; self.curlmax = 20
			self.recommendedCurl = 10; self.currentCurl = self.recommendedCurl
			curlpos = wiz.percentage(self.currentCurl, self.curlmax)
			recommended2 = '[COLOR lime]CURL pauza/CURL niska brzina:[/COLOR] [COLOR white]%ss[/COLOR]' % (self.recommendedCurl)
			
			########Read Buffer Factor#####
			self.readmin = 0; self.readmax = 10
			self.recommendedRead = 5; self.currentRead = self.recommendedRead
			readpos = wiz.percentage(self.currentRead, self.readmax)
			recommended3 = '[COLOR lime]Ocitavanje buffera[/COLOR] [COLOR white]%s[/COLOR]' % (self.recommendedRead)
			
			######Buffer Mode#####
			recommended4 = '[COLOR lime]Buffer Mode:[/COLOR] [COLOR white]2[/COLOR]' 

			
			####BOX##
			msgbox='[COLOR lime]Postavke ce se upisati u advancesettings.xml[/COLOR]\r\n\r\n%s\r\n%s\r\n%s\r\n%s' %(recommended4, recommended1, recommended3, recommended2)
			self.box=xbmcgui.ControlTextBox(L+25,T+50,W,H, font='font14')
			self.addControl(self.box)
			self.box.setText(msgbox)
			
			####Buttons###
			
			
			
			self.buttonWrite=xbmcgui.ControlButton(leftside,T+H-40-BorderWidth,(W/2)-(BorderWidth*2),35,"Napravi datoteku",textColor="0xFFFFFFFF",focusedColor="0xFF04fc05",alignment=2,focusTexture=buttonfocus,noFocusTexture=buttonnofocus)
			self.buttonCancel=xbmcgui.ControlButton(rightside+BorderWidth*2,T+H-40-BorderWidth,(W/2)-(BorderWidth*2),35,"Odustani",textColor="0xFFFFFFFF",focusedColor="0xFF04fc05",alignment=2,focusTexture=buttonfocus,noFocusTexture=buttonnofocus)
			
			self.addControl(self.buttonWrite); self.addControl(self.buttonCancel)
			self.setFocus(self.buttonCancel)
			
			self.buttonWrite.controlLeft(self.buttonCancel); self.buttonWrite.controlRight(self.buttonCancel); self.buttonCancel.controlLeft(self.buttonWrite); self.buttonCancel.controlRight(self.buttonWrite)
Пример #21
0
		def __init__(self,msg='',L=0,T=0,W=1280,H=720,TxtColor='0xFFFFFFFF',Font='font10',BorderWidth=10):
			buttonfocus, buttonnofocus = artwork('button')
			self.BG=xbmcgui.ControlImage(L+BorderWidth,T+BorderWidth,W-(BorderWidth*2),H-(BorderWidth*2), FANART, aspectRatio=0)
			self.addControl(self.BG)
			top = T+BorderWidth
			leftside = L+BorderWidth
			rightside = L+(W/2)-(BorderWidth*2)
			
			header = '[COLOR %s]Quick Advanced Settings Configurator[/COLOR]' % (COLOR3)
			self.Header=xbmcgui.ControlLabel(L, top, W, 30, header, font='font13', textColor=TxtColor, alignment=0x00000002)
			self.addControl(self.Header)
			top += 30+BorderWidth
			
			#####Video Cache Size####
			freeMemory = int(float(wiz.getInfo('System.Memory(free)')[:-2])*.33)
			recMemory = int(float(wiz.getInfo('System.Memory(free)')[:-2])*.23)

			self.videomin = 0; self.videomax = freeMemory if freeMemory < 2000 else 2000
			self.recommendedVideo = recMemory if recMemory < 500 else 500; self.currentVideo = self.recommendedVideo
			current1 = '[COLOR %s]Video Cache Size[/COLOR]=[COLOR %s]%s MB[/COLOR]' % (COLOR1, COLOR2, self.currentVideo)
			recommended1 = '[COLOR %s]Video Cache Size:[/COLOR] [COLOR %s]%s MB[/COLOR]' % (COLOR1, COLOR5, self.recommendedVideo)
			
			####CURL Timeout/CURL Low Speed####
			self.curlmin = 0; self.curlmax = 20
			self.recommendedCurl = 10; self.currentCurl = self.recommendedCurl
			curlpos = wiz.percentage(self.currentCurl, self.curlmax)
			recommended2 = '[COLOR %s]CURL Timeout/CURL Low Speed:[/COLOR] [COLOR %s]%ss[/COLOR]' % (COLOR1, COLOR5, self.recommendedCurl)
			
			########Read Buffer Factor#####
			self.readmin = 0; self.readmax = 10
			self.recommendedRead = 5; self.currentRead = self.recommendedRead
			readpos = wiz.percentage(self.currentRead, self.readmax)
			recommended3 = '[COLOR %s]Read Buffer Factor:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR1, COLOR5, self.recommendedRead)
			
			######Buffer Mode#####
			recommended4 = '[COLOR %s]Buffer Mode:[/COLOR] [COLOR %s]2[/COLOR]' %(COLOR1, COLOR5)

			
			####BOX##
			msgbox='[COLOR %s]These settings will be written to the advancesettings.xml[/COLOR]\r\n\r\n%s\r\n%s\r\n%s\r\n%s' %(COLOR4, recommended4, recommended1, recommended3, recommended2)
			self.box=xbmcgui.ControlTextBox(L+25,T+50,W,H, font='font14')
			self.addControl(self.box)
			self.box.setText(msgbox)
			
			####Buttons###
			
			
			
			self.buttonWrite=xbmcgui.ControlButton(leftside,T+H-40-BorderWidth,(W/2)-(BorderWidth*2),35,"Write File",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=buttonfocus,noFocusTexture=buttonnofocus)
			self.buttonCancel=xbmcgui.ControlButton(rightside+BorderWidth*2,T+H-40-BorderWidth,(W/2)-(BorderWidth*2),35,"Cancel",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=buttonfocus,noFocusTexture=buttonnofocus)
			
			self.addControl(self.buttonWrite); self.addControl(self.buttonCancel)
			self.setFocus(self.buttonCancel)
			
			self.buttonWrite.controlLeft(self.buttonCancel); self.buttonWrite.controlRight(self.buttonCancel); self.buttonCancel.controlLeft(self.buttonWrite); self.buttonCancel.controlRight(self.buttonWrite)
Пример #22
0
 def __init__( self, *args, **kwargs):
     self.getTitle = kwargs.get('title')
     self.getPlot = kwargs.get('plot')
     self.getThumbnail = kwargs.get('thumbnail')
     self.getFanart = kwargs.get('fanart')
     
     self.background = xbmcgui.ControlImage( 70, 20, 1150, 630, 'http://s6.postimg.org/n3ph1uxn5/ventana.png')
     self.title = xbmcgui.ControlTextBox(120, 60, 430, 50)
     self.plot = xbmcgui.ControlTextBox( 120, 150, 1056, 100 )
     self.thumbnail = xbmcgui.ControlImage( 120, 300, 1056, 300, self.getThumbnail )
     self.fanart = xbmcgui.ControlImage( 780, 43, 390, 100, self.getFanart )
     
     self.addControl(self.background)
     self.addControl(self.title)
     self.addControl(self.plot)
     self.addControl(self.thumbnail)
     self.addControl(self.fanart)
     
     self.title.setText( self.getTitle )
     self.plot.setText(  self.getPlot )
Пример #23
0
	def __init__(self):
		self.setCoordinateResolution(6)

		#
		# Menu
		
		# Build screen
		self.addControl(xbmcgui.ControlImage(0,0, 720,576, HOMEDIR+'images/background.png'))
		self.addControl(xbmcgui.ControlLabel(56,45, 200, 145, 'Arcade Browser v'+VERSION, 'special12', '0xFFFFFFFF'))
		self.addControl(xbmcgui.ControlImage(211, 29, 64, 43, HOMEDIR+"images/rednet.png"))
		self.addControl(xbmcgui.ControlLabel(280, 50, 200, 100, 'www.REDnet.nl', 'font101', '0xFFCCCCFF'))
		self.addControl(xbmcgui.ControlLabel(56,65, 200, 135, 'Emulators', 'special13', '0xFFFFFF00'))

		# Define controls
		self.lstMain = xbmcgui.ControlList(50, 110, 320, 450, buttonTexture=HOMEDIR+"images/btn.png", buttonFocusTexture=HOMEDIR+"images/btnHili.png")
		self.lblTotal = xbmcgui.ControlLabel(340,526, 200,35, '', 'font10', '0xFFFFFF00', alignment=1)
		self.lblTitle = xbmcgui.ControlLabel(400, 65, 400, 35, '', 'special13', '0xFFFFFF00')
		self.txtDesc = xbmcgui.ControlTextBox(400, 330, 290, 300, 'font101', '0xFFFFCC88') # Out of screen on purpose - no 1/1 in textfield
		self.lblDebug = xbmcgui.ControlLabel(4, 560, 0, 0, '', 'font10', '0xFFFF8800')
		self.imgPreview = xbmcgui.ControlImage(400, 115, 256, 192, "")
		self.btnView = xbmcgui.ControlButton(400, 504, 80, 30, "Favorites")
		self.btnInit = xbmcgui.ControlButton(496, 504, 80, 30, "Reload")
		self.btnHelp = xbmcgui.ControlButton(592, 504, 80, 30, "Help")

		# Add controls
		self.addControl(self.lstMain)
		self.addControl(self.lblTotal)
		self.addControl(self.lblTitle)
		self.addControl(self.txtDesc)
		self.addControl(self.imgPreview)
		self.addControl(self.lblDebug)

		# Add button controls
		self.addControl(self.btnView)
		self.addControl(self.btnInit)
		self.addControl(self.btnHelp)

		# Link control navigation
		self.lstMain.controlLeft(self.btnHelp)
		self.lstMain.controlRight(self.btnView)
		self.btnView.controlLeft(self.lstMain)
		self.btnView.controlRight(self.btnInit)
		self.btnInit.controlLeft(self.btnView)
		self.btnInit.controlRight(self.btnHelp)
		self.btnHelp.controlLeft(self.btnInit)
		self.btnHelp.controlRight(self.lstMain)

		self.setFocus(self.lstMain)

		self.getConfig(HOMEDIR+INIFILE)
		if not self.selRom < 0:
			self.listRoms(self.selEmu)
		else:
			self.listEmulators(self.selEmu)
Пример #24
0
		def __init__(self,msg='',L=0,T=0,W=1280,H=720,TxtColor='0xFFFFFFFF',Font='font14',BorderWidth=10):
			image_path = os.path.join(ART, 'ContentPanel.png')
			self.border = xbmcgui.ControlImage(L,T,W,H, image_path)
			self.addControl(self.border); 
			self.BG=xbmcgui.ControlImage(L+BorderWidth,T+BorderWidth,W-(BorderWidth*2),H-(BorderWidth*2), BACKGROUND, aspectRatio=0, colorDiffuse='0x9FFFFFFF')
			self.addControl(self.BG)
			#title
			if HEADERTYPE == 'Image':
				iLogoW=144; iLogoH=68
				self.iLogo=xbmcgui.ControlImage((L+(W/2))-(iLogoW/2),T+10,iLogoW,iLogoH,HEADERIMAGE,aspectRatio=0)
				self.addControl(self.iLogo)
			else:
				title = HEADERMESSAGE
				times = int(float(FONTHEADER[-2:]))
				temp = title.replace('[', '<').replace(']', '>')
				temp = re.sub('<[^<]+?>', '', temp)
				title_width = len(str(temp))*(times - 1)
				title = THEME3 % title
				self.title=xbmcgui.ControlTextBox(L+(W-title_width)/2,T+BorderWidth,title_width,30,font=FONTHEADER,textColor='0xFF1E90FF')
				self.addControl(self.title)
				self.title.setText(title)
			#body
			msg = THEME2 % msg
			self.TxtMessage=xbmcgui.ControlTextBox(L+BorderWidth+10,T+30+BorderWidth,W-(BorderWidth*2)-20,H-(BorderWidth*2)-75,font=Font,textColor=TxtColor)
			self.addControl(self.TxtMessage)
			self.TxtMessage.setText(msg)
			#buttons
			
			focus, nofocus = artwork('button')
			w1      = int((W-(BorderWidth*5))/3); h1 = 35
			t       = int(T+H-h1-(BorderWidth*1.5))
			space   = int(L+(BorderWidth*1.5))
			dismiss = int(space+w1+BorderWidth)
			later   = int(dismiss+w1+BorderWidth)
			
			self.buttonDismiss=xbmcgui.ControlButton(dismiss,t,w1,h1,"Dismiss",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus)
			self.buttonRemindMe=xbmcgui.ControlButton(later,t,w1,h1,"Remind Me Later",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus)
			self.addControl(self.buttonDismiss); self.addControl(self.buttonRemindMe)
			self.buttonRemindMe.controlLeft(self.buttonDismiss); self.buttonRemindMe.controlRight(self.buttonDismiss)
			self.buttonDismiss.controlLeft(self.buttonRemindMe); self.buttonDismiss.controlRight(self.buttonRemindMe)
			self.setFocus(self.buttonRemindMe);
Пример #25
0
 def __init__( self, *args, **kwargs):
     
     self.getTitle = kwargs.get('title')
     self.getPlot = kwargs.get('plot')
     self.getThumbnail = kwargs.get('thumbnail')
     self.getFanart = kwargs.get('fanart')
     
     self.background = xbmcgui.ControlImage( 70, 20, 1150, 630, 'http://s6.postimg.org/58jknrvtd/backgroundventana5.png')
     self.title = xbmcgui.ControlTextBox(140, 60, 1130, 50)
     self.plot = xbmcgui.ControlTextBox( 140, 140, 1035, 600 )
     self.thumbnail = xbmcgui.ControlImage( 813, 43, 390, 100, self.getThumbnail )
     self.fanart = xbmcgui.ControlImage( 140, 471, 1035, 150, self.getFanart )
     
     self.addControl(self.background)
     self.addControl(self.title)
     self.addControl(self.plot)
     self.addControl(self.thumbnail)
     self.addControl(self.fanart)
     
     self.title.setText( self.getTitle )
     self.plot.setText(  self.getPlot )
Пример #26
0
	def showEndResultSP(self):
		self.rec_speed = xbmcgui.ControlTextBox(325,475,600,300, textColor='0xFFFFFFFF')
		self.addControl(self.rec_speed)
		self.rec_speed.setVisible(False)
		self.rec_speed.setEnabled(False)
		self.rec_speed.setText("".join("[B]Recomenended Speeds for Streaming! \n3 to 5 Mb/s for viewing standard definition 480p video \n5 to 10 Mb/s for viewing high-def 720p video \n10+ Mb/s or more for the best  1080p experience \n10+ Mb/s for the best Live TV Streaming experience \n25 to 50+ Mb/s 4K streaming \nAll Speeds are based on the device not what speed you pay for![/B]"))
		self.rec_speed.setAnimations([
			('conditional',
			'effect=fade start=0 end=100 time=1000 delay=100 condition=Control.IsVisible(%d)' % self.rec_speed.getId()),
		])
		self.rec_speed.setVisible(True)
		self.rec_speed.setEnabled(True)
Пример #27
0
    def __init__(self):
        self.strActionInfoBox = xbmcgui.ControlTextBox(300, 120, 600, 600, 'font13', '0xFFFFFFFA')
        self.addControl(self.strActionInfoBox)
        self.strActionInfoBox.setText(txt)        

        self.strActionInfo = xbmcgui.ControlLabel(300, 500, 400, 200, '', 'font13', '0xFFAFAFAF')
        self.addControl(self.strActionInfo)
        self.strActionInfo.setLabel('zurueck (ESC)')

        self.strActionFade = xbmcgui.ControlFadeLabel(350, 50, 200, 200, 'font18', '0xFFAFAFAF')
        self.addControl(self.strActionFade)
        self.strActionFade.addLabel('Beschreibung')
Пример #28
0
 def __init__(self, *kargs):
     self.addControl(
         xbmcgui.ControlRadioButton(100,
                                    250,
                                    200,
                                    50,
                                    'Status',
                                    font='font14'))
     self.addControl(xbmcgui.ControlGroup(200, 250, 125, 75))
     self.addControl(
         xbmcgui.ControlTextBox(300, 250, 300, 300, textColor='0xFFFFFFFF'))
     '''noFocus  = sys.modules[ "__main__"].__root__ + '/icons/bookmarks.png'
Пример #29
0
	def __init__(self,noteType='t',noteMessage='',noteImage='',L=140,T=110,W=1000,H=500,Font='font14',TxtColor='0xFF64d1ff'):
		if len(noteImage)==0: noteImage=DefaultNoteImage
		if   (noteType.lower()=='text')  or (noteType.lower()=='t'): noteType='t'
		elif (noteType.lower()=='image') or (noteType.lower()=='i'): noteType='i'
		self.noteType=noteType; self.noteMessage=noteMessage; self.noteImage=noteImage; self.Font=Font; self.TxtColor=TxtColor; 
		## ### ## 
		self.background=OverlayBackground; #artp('black1'); 
		self.BG=xbmcgui.ControlImage(L,T,W,H,self.background,aspectRatio=0,colorDiffuse='0xFF3030FF'); 
		#self.OlayBrdr=xbmcgui.ControlImage(L,T,W,H,OverlayBorder,aspectRatio=0); 
		#self.OlaySplash=xbmcgui.ControlImage(L,T,W,H,icon,aspectRatio=0); 
		iLogoW=144; iLogoH=68; 
		self.iLogo=xbmcgui.ControlImage((L+(W/2))-(iLogoW/2),T+10,iLogoW,iLogoH,hubLogo,aspectRatio=0); 
		## ### ## 
		###L2=L+110; T2=T+130; W2=W-(T2-T)-90; H2=H-(L2-L)-110; #L3=L2+5; T3=T2+5; W3=W2-18; H3=H2-10; 
		##L2=L+87; T2=T+80; W2=W-(T2-T)-96; H2=H-(L2-L)-74; L3=L2+5; T3=T2+60; W3=W2-18; H3=H2-5-60; 
		#L2=L+67; T2=T+60; W2=W-(T2-T)-96; H2=H-(L2-L)-74; 
		L2=200; T2=200; W2=880; H2=340; 
		L3=L2+5; T3=T2+60; W3=W2-18; H3=H2-5-60; 
		self.ImgMessage=xbmcgui.ControlImage(L2,T2,W2,H2,self.noteImage,aspectRatio=0); 
		self.TxtMessage=xbmcgui.ControlTextBox(L2+5,T2,W2-10,H2,font=self.Font,textColor=self.TxtColor); 
		#self.TxtMessage=xbmcgui.ControlTextBox(L3,T3,W3,H3,font=self.Font,textColor=self.TxtColor); 
		#print [self.background,OverlayBorder,self.noteImage]
		## ### ## 
		focus=artp('button-focus_lightblue'); nofocus=artp('button-focus_grey'); 
		w1=120; h1=35; w2=160; h2=35; spacing1=20; 
		l2=L+W-spacing1-w2; t2=T+H-h2-spacing1; 
		l1=L+W-spacing1-w2-spacing1-w1; t1=T+H-h1-spacing1; ###Modded by FTG###
		self.buttonDismiss=xbmcgui.ControlButton(l1,t1,w1,h1,"Dismiss",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus); 
		self.buttonRemindMe=xbmcgui.ControlButton(l2,t2,w2,h2,"Remind Later",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus); 
		#self.buttonRemindMe=xbmcgui.ControlButton(l2,t2,w2,h2,"Remind Later",textColor="0xFF000000",focusedColor="0xFF000000",alignment=2,focusTexture=focus,noFocusTexture=nofocus); 
		#self.OlaySplash
		for z in [self.BG,self.ImgMessage,self.TxtMessage,self.iLogo,self.buttonRemindMe,self.buttonDismiss]: self.addControl(z); 
		#for z in [self.BG,self.ImgMessage,self.TxtMessage,self.OlayBrdr,self.buttonRemindMe,self.buttonDismiss]: self.addControl(z); 
		#for z in [self.BG,self.OlayBrdr,self.ImgMessage,self.TxtMessage,self.buttonRemindMe,self.buttonDismiss]: self.addControl(z); 
		#self.OlayBrdr.setAnimations([('WindowOpen','effect=fade delay=0 time=0 start=0 end=70')]); 
		#self.ImgMessage.setAnimations([('WindowOpen','effect=fade delay=0 time=0 start=0 end=70')]); 
		#self.OlaySplash.setAnimations([('WindowOpen','effect=fade delay=0 time=8000 start=100 end=0')]); 
		#self.OlaySplash.setAnimations([('WindowOpen','effect=slide delay=0 time=5000 start=-1800 end=1800')]); 
		#self.ImgMessage.setAnimations([('WindowOpen','effect=fade delay=2000 time=2000 start=0 end=100')]); 
		#for z in [self.BG,self.ImgMessage,self.TxtMessage,self.OlayBrdr,self.buttonRemindMe,self.buttonDismiss]: 
		for z in [self.BG,self.ImgMessage,self.TxtMessage,self.iLogo,self.buttonRemindMe,self.buttonDismiss]: 
			#z.setAnimations([('WindowOpen','effect=slide delay=0 time=5000 start=0,-1800 end=0'),('WindowClose','effect=slide delay=0 time=5000 start=0 end=0,-1800')]); 
			z.setAnimations([('WindowOpen','effect=fade delay=0 time=2000 start=0 end=100'),('WindowClose','effect=slide delay=0 time=2000 start=0 end=0,'+str(0-(H+T+10)))]); 
		## ### ## 
		self.buttonRemindMe.controlLeft(self.buttonDismiss); self.buttonRemindMe.controlRight(self.buttonDismiss); 
		self.buttonDismiss.controlLeft(self.buttonRemindMe); self.buttonDismiss.controlRight(self.buttonRemindMe); 
		## ### ## 
		self.TxtMessage.setText(self.noteMessage); 
		self.setFocus(self.buttonRemindMe); 
Пример #30
0
 def artist_biography(self, **params):
     key = params['key']
     artist = self._rdio_api.call(
         "get",
         keys=key,
         extras='[{"field": "*", "exclude": true}, {"field": "review"}]'
     )[key]
     biography = artist[
         'review'] if 'review' in artist else self._addon.get_string(
             30238).encode('UTF-8')
     window = xbmcgui.Window()
     control = xbmcgui.ControlTextBox(0, 0, 500, 500)
     control.setText(biography)
     window.addControl(control)
     window.doModal()