WindowDialog: an example ?
#1
Thanks to Google, spare time, patience and this forum, I found this:

http://forum.xbmc.org/showthread.php?tid=18535

Now i know of existence of WindowDialog class. So I'm looking for a WindowDialog example..
1 - where can I find one ?
2 - is possible to open a WindowDialog from a PLUGIN from Programs ? (my addon offers audio, video, and texts. and so i need from Programs to show a list, and when user select one item, to open a windowDialog with a remote text)
Reply
#2
I'm trying this
Code:
import xbmcgui
import sys

try: Emulating = xbmcgui.Emulating
except: Emulating = False

class Example(xbmcgui.WindowDialog):

    def __init__(self,):
        if Emulating: xbmcgui.Window.__init__(self)
        self.abouttitle = xbmcgui.ControlLabel(340, 135, 300, 30, str(sys.argv) )
        self.addControl(self.abouttitle)
        
    def onControl(self, c):
        if self.h1 == c:
            print "hey"
        if self.something == c:
            print "you press med"
        if self.btn_quit == c:
            self.close()

Z = Example()
Z.doModal()
del Z

But the effect is only a string overimpress over whatelse is actually on video:

Image

I'm calling it from another script in this way:

Code:
path =  os.path.dirname( __file__ ) + os.sep
    command = "XBMC.RunScript(" + path  + "script_daily_text.py," + date + ")"
    xbmc.executebuiltin(command)
Reply

Logout Mark Read Team Forum Stats Members Help
WindowDialog: an example ?1