Esempio n. 1
0
def showDialog(lines, timeout=0):
    win = xbmcgui.WindowDialog()
    background_img = os.path.join(Const.addon_path, 'resources', 'media',
                                  'info_background.png')
    starty = 0
    h = 75 + 25 * len(lines)
    win.addControl(
        xbmcgui.ControlImage(x=0,
                             y=starty,
                             width=1920,
                             height=h,
                             filename=background_img,
                             colorDiffuse='0xEEEEEEEE'))
    y = starty
    for line in lines:
        y += 25
        win.addControl(
            xbmcgui.ControlLabel(x=50, y=y, width=1820, height=25, label=line))
    if timeout > 0:
        win.show()
        xbmc.sleep(5000)
        win.close()
    else:
        win.doModal()
    del win
Esempio n. 2
0
wait = monitor().waitForAbort
aborted = monitor().abortRequested
cleanmovietitle = xbmc.getCleanMovieTitle

transPath = xbmc.translatePath
skinPath = transPath('special://skin/')
addonPath = transPath(addonInfo('path'))
legalfilename = xbmc.makeLegalFilename

dataPath = transPath(addonInfo('profile'))

window = xbmcgui.Window(10000)
dialog = xbmcgui.Dialog()
progressDialog = xbmcgui.DialogProgress()
progressDialogGB = xbmcgui.DialogProgressBG()
windowDialog = xbmcgui.WindowDialog()
button = xbmcgui.ControlButton
image = xbmcgui.ControlImage
alphanum_input = xbmcgui.INPUT_ALPHANUM
password_input = xbmcgui.INPUT_PASSWORD
hide_input = xbmcgui.ALPHANUM_HIDE_INPUT
verify = xbmcgui.PASSWORD_VERIFY
item = xbmcgui.ListItem

openFile = xbmcvfs.File
read = openFile.read
readbytes = openFile.readBytes
makeFile = xbmcvfs.mkdir
makeFiles = xbmcvfs.mkdirs
deleteFile = xbmcvfs.delete
deleteDir = xbmcvfs.rmdir