本文整理汇总了Python中xbmcgui.ControlImage方法的典型用法代码示例。如果您正苦于以下问题:Python xbmcgui.ControlImage方法的具体用法?Python xbmcgui.ControlImage怎么用?Python xbmcgui.ControlImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xbmcgui
的用法示例。
在下文中一共展示了xbmcgui.ControlImage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def __init__(self, w=OVERLAY_WIDTH, h=OVERLAY_HEIGHT, *args, **kwargs):
self.window = xbmcgui.Window(WINDOW_FULLSCREEN_VIDEO)
viewport_w, viewport_h = self._get_skin_resolution()
# Adjust size based on viewport, we are using 1080p coordinates
w = int(old_div(w * viewport_w, VIEWPORT_WIDTH))
h = int(old_div(h * viewport_h, VIEWPORT_HEIGHT))
x = old_div((viewport_w - w), 2)
y = old_div((viewport_h - h), 2) + int(ADDON.getSetting(id="overlay_status_offset"))
self._shown = False
self._text = ""
self._label = xbmcgui.ControlLabel(x, y, w, h, self._text,
alignment=XBFONT_CENTER_X | XBFONT_CENTER_Y, *args, **kwargs)
self._shadow = xbmcgui.ControlLabel(x + 1, y + 1, w, h, self._text,
textColor='0xD0000000',
alignment=XBFONT_CENTER_X | XBFONT_CENTER_Y, *args, **kwargs)
if not PY3:
self._background = xbmcgui.ControlImage(x, y, w, h, os.path.join(ADDON_PATH, "resources", "img", "black.png").encode('utf-8'))
else:
self._background = xbmcgui.ControlImage(x, y, w, h, os.path.join(ADDON_PATH, "resources", "img", "black.png"))
if isinstance(self._background, bytes):
self._background = self._background.decode("utf8")
self._background.setColorDiffuse("0xD0000000")
示例2: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def __init__(self, cookie, tokens, vcodetype, codeString, vcode_path):
self.cookie = cookie
self.tokens = tokens
self.vcodetype = vcodetype
self.codeString = codeString
self.vcode_path = vcode_path
# windowItems
self.image = xbmcgui.ControlImage(80, 100, 500, 200, self.vcode_path)
self.buttonInput = xbmcgui.ControlButton(
100, 330, 220, 50, label=u'输入验证码', alignment=6, font='font13', textColor='0xFFFFFFFF'
)
self.buttonRefresh = xbmcgui.ControlButton(
290, 330, 220, 50, label=u'刷新验证码', alignment=6, font='font13', textColor='0xFFFFFFFF'
)
self.addControls([self.image, self.buttonInput, self.buttonRefresh])
self.buttonInput.controlRight(self.buttonRefresh)
self.buttonRefresh.controlLeft(self.buttonInput)
self.setFocus(self.buttonInput)
示例3: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def __init__(self, w, h, *args, **kwargs):
self.window = xbmcgui.Window(WINDOW_FULLSCREEN_VIDEO)
viewport_w, viewport_h = self._get_skin_resolution()
# Adjust size based on viewport, we are using 1080p coordinates
w = int(w * viewport_w / VIEWPORT_WIDTH)
h = int(h * viewport_h / VIEWPORT_HEIGHT)
x = (viewport_w - w) / 2
y = (viewport_h - h) / 2
self._shown = False
self._text = ""
self._label = xbmcgui.ControlLabel(x, y, w, h, self._text, *args, **kwargs)
self._background = xbmcgui.ControlImage(x, y, w, h, os.path.join(RESOURCES_PATH, "images", "black.png"))
self._background.setColorDiffuse("0xD0000000")
示例4: _add_editcontrol
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def _add_editcontrol(self, x, y, height, width, password=0):
media = os.path.join(xbmcaddon.Addon(addon_id()).getAddonInfo('path'), 'resources', 'skins', 'default', 'media')
control = xbmcgui.ControlImage(0, 0, 0, 0,
filename=os.path.join(media, "white.png"),
aspectRatio=0,
colorDiffuse="ff111111")
control.setPosition(x, y)
control.setHeight(height)
control.setWidth(width)
self.addControl(control)
return control
示例5: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def __init__(self):
self.showing = False
self.window = xbmcgui.Window(12005)
viewport_w, viewport_h = self._get_skin_resolution()
font_max = 'font13'
font_min = 'font10'
origin_x = int(float(viewport_w)/1.3913)
origin_y = int(float(viewport_h)/8.0)
window_w = int(float(viewport_w)/3.7647)
window_h = int(float(viewport_h)/2.5714)
acelogo_w = int(float(window_w)/8.5)
acelogo_h = int(float(window_w)/11.0)
text_lat = int(float(window_w)/15)
text_w = int(float(window_w)/1.7)
text_h = int(float(window_h)/14)
fst_setting = int(float(window_h)/3.5)
fst_stat_setting = int(float(window_h)/1.4)
#main window
self._background = xbmcgui.ControlImage(origin_x, origin_y, window_w, window_h, os.path.join(addonpath,"resources","art","background.png"))
self._acestreamlogo = xbmcgui.ControlImage(origin_x + int(float(window_w)/11.3), origin_y + int(float(window_h)/14), acelogo_w, acelogo_h, os.path.join(addonpath,"resources","art","acestreamlogo.png"))
self._supseparator = xbmcgui.ControlImage(origin_x, origin_y + int(float(viewport_h)/12.176), window_w-10, 1, os.path.join(addonpath,"resources","art","separator.png"))
self._botseparator = xbmcgui.ControlImage(origin_x, origin_y + window_h - 30, window_w-10, 1, os.path.join(addonpath,"resources","art","separator.png"))
self._title = xbmcgui.ControlLabel(origin_x+int(float(window_w)/3.4), origin_y + text_h, window_w - 140, text_h, str(translate(30062)), font=font_max, textColor='0xFFEB9E17')
self._total_stats_label = xbmcgui.ControlLabel(origin_x+int(float(window_h)/1.72), origin_y + int(float(window_h)/1.6), int(float(window_w)/1.7), 20, str(translate(30063)), font=font_min, textColor='0xFFEB9E17')
#labels
self._action = xbmcgui.ControlLabel(origin_x + text_lat, origin_y + fst_setting, int(float(text_w)*1.6), text_h, str(translate(30064)) + ' N/A', font=font_min)
self._download = xbmcgui.ControlLabel(origin_x + text_lat, origin_y + fst_setting + text_h, int(float(text_w)*1.6), text_h, str(translate(30065)) + ' N/A', font=font_min)
self._upload = xbmcgui.ControlLabel(origin_x + text_lat, origin_y + fst_setting + 2*text_h, text_w, text_h, str(translate(30066)) + ' N/A', font=font_min)
self._seeds = xbmcgui.ControlLabel(origin_x + text_lat, origin_y + fst_setting + 3*text_h, text_w, text_h, str(translate(30067)) + ' N/A', font=font_min)
self._total_download = xbmcgui.ControlLabel(origin_x + text_lat, origin_y + fst_stat_setting, text_w, text_h, str(translate(30068)) + ' N/A', font=font_min)
self._total_upload = xbmcgui.ControlLabel(origin_x + text_lat, origin_y + fst_stat_setting + text_h, text_w, text_h, str(translate(30069)) + ' N/A', font=font_min)
self._percent_value = xbmcgui.ControlLabel(origin_x+int(float(window_h)/1.05), origin_y + fst_setting, text_w, text_h,'N/A', font=font_min)
示例6: get_response
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def get_response(img):
try:
img = xbmcgui.ControlImage(450, 0, 400, 130, img)
wdlg = xbmcgui.WindowDialog()
wdlg.addControl(img)
wdlg.show()
common.kodi.sleep(3000)
solution = common.kodi.get_keyboard(common.i18n('letters_image'))
if not solution:
raise Exception('captcha_error')
finally:
wdlg.close()
return solution
示例7: onAction
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def onAction(self, action):
plugintools.log("ChannelWindow.onAction action.id="+repr(action.getId())+" action.buttonCode="+repr(action.getButtonCode()))
if action == ACTION_PARENT_DIR or action==ACTION_PREVIOUS_MENU or action==ACTION_PREVIOUS_MENU2:
self.close()
if action == ACTION_SELECT_ITEM:
loader_image = os.path.join( plugintools.get_runtime_path(), 'resources', 'skins', 'Default', 'media', 'loader.gif')
loader = xbmcgui.ControlImage(1200, 19, 40, 40, loader_image)
self.addControl(loader)
pos = self.control_list.getSelectedPosition()
item = self.itemlist[pos]
if item.action.startswith("play_"):
play_items = navigation.get_next_items( item )
loader.setVisible(False)
media_url = play_items[0].url
plugintools.direct_play(media_url)
else:
next_items = navigation.get_next_items( item )
loader.setVisible(False)
# Si no hay nada, no muestra la pantalla vacía
if len(next_items)>0:
next_window = navigation.get_window_for_item( item )
next_window.setItemlist(next_items)
next_window.setParentItem(item)
next_window.doModal()
del next_window
示例8: onAction
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def onAction(self, action):
plugintools.log("MenuWindow.onAction action.id="+repr(action.getId())+" action.buttonCode="+repr(action.getButtonCode()))
pos = self.control_list.getSelectedPosition()
item = self.itemlist[pos]
if item.thumbnail!="" and not "thumb_error" in item.thumbnail and not "thumb_folder" in item.thumbnail and not "thumb_nofolder" in item.thumbnail:
self.getControl(301).setImage(item.thumbnail)
self.getControl(302).setText(item.title)
self.getControl(303).setText(item.plot)
if action == ACTION_PARENT_DIR or action==ACTION_PREVIOUS_MENU or action==ACTION_PREVIOUS_MENU2:
self.close()
if action == ACTION_SELECT_ITEM:
loader_image = os.path.join( plugintools.get_runtime_path(), 'resources', 'skins', 'Default', 'media', 'loader.gif')
loader = xbmcgui.ControlImage(1200, 19, 40, 40, loader_image)
self.addControl(loader)
pos = self.control_list.getSelectedPosition()
item = self.itemlist[pos]
next_items = navigation.get_next_items( item )
loader.setVisible(False)
# Si no hay nada, no muestra la pantalla vacía
if len(next_items)>0:
next_window = navigation.get_window_for_item( item )
next_window.setItemlist(next_items)
next_window.setParentItem(item)
next_window.doModal()
del next_window
示例9: onControl
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def onControl(self, event):
if event == self.buttonInput:
self.close()
elif event == self.buttonRefresh:
(self.codeString, self.vcode_path) = auth.refresh_vcode(self.cookie, self.tokens, self.vcodetype)
if self.codeString and self.vcode_path:
self.removeControl(self.image)
self.image = xbmcgui.ControlImage(80, 100, 500, 200, self.vcode_path)
self.addControl(self.image)
else:
dialog.ok('Error', u'无法刷新验证码,请重试')
# Authorisation Process
示例10: setFrame
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
def setFrame(self, title):
"""
Define paths to images for window background and title background textures,
and set control position adjustment constants used in setGrid.
This is a helper method not to be called directly.
"""
# Window background image
self.background_img = os.path.join(_images, 'AddonWindow', 'ContentPanel.png')
# Background for a window header
self.title_background_img = os.path.join(_images, 'AddonWindow', 'dialogheader.png')
# Horisontal adjustment for a header background if the main background has transparent edges.
self.X_MARGIN = 5
# Vertical adjustment for a header background if the main background has transparent edges
self.Y_MARGIN = 5
# Header position adjustment if the main backround has visible borders.
self.Y_SHIFT = 4
# The height of a window header (for the title background and the title label).
self.HEADER_HEIGHT = 35
self.background = xbmcgui.ControlImage(-10, -10, 1, 1, self.background_img)
self.addControl(self.background)
self.setAnimation(self.background)
self.title_background = xbmcgui.ControlImage(-10, -10, 1, 1, self.title_background_img)
self.addControl(self.title_background)
self.setAnimation(self.title_background)
self.title_bar = xbmcgui.ControlLabel(-10, -10, 1, 1, title, alignment=ALIGN_CENTER, textColor='0xFFFFA500',
font='font13_title')
self.addControl(self.title_bar)
self.setAnimation(self.title_bar)
self.window_close_button = xbmcgui.ControlButton(-100, -100, 60, 30, '',
focusTexture=os.path.join(_images, 'AddonWindow', 'DialogCloseButton-focus.png'),
noFocusTexture=os.path.join(_images, 'AddonWindow', 'DialogCloseButton.png'))
self.addControl(self.window_close_button)
self.setAnimation(self.window_close_button)
示例11: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
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/JbRim10.jpg')
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=2500 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 )
示例12: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
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 )
示例13: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
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/btby9SG.jpg')
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 )
示例14: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
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/oWUdNFg.jpg')
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 )
示例15: __init__
# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlImage [as 别名]
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/gh1GShA.jpg')
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 )