Kodi Community Forum
Simple multi image control? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Simple multi image control? (/showthread.php?tid=262975)



Simple multi image control? - Lunatixz - 2016-03-06

Hi I'm trying to setup a fading multi image control for a python script.

Is there a simple control that doesn't require a listitem? Not that I mind using a listitem, but that seems over complicated for my needs.

I have four static named images that I want to fade through... I'd like something similar in function to belows nonfunctional code, is that possible?

Thanks in advance.
Code:
<control type="image">
            <description>Screenshots</description>
            <fadetime>200</fadetime>
            <autoscroll>true</autoscroll>
            <left>385</left>
            <top>275</top>
            <width>1145</width>
            <height>545</height>
            <animation effect="fade" start="0" end="100" time="3000">Focus</animation>
            <texture>$INFO[Window(10000).Property(PTVL.SKINSHOT1)]</texture>
            <texture>$INFO[Window(10000).Property(PTVL.SKINSHOT2)]</texture>
            <texture>$INFO[Window(10000).Property(PTVL.SKINSHOT3)]</texture>
            <texture>$INFO[Window(10000).Property(PTVL.SKINSHOT4)]</texture>
</control>



RE: Simple multi image control? - ronie - 2016-03-06

if your script can put all 4 images in the same folder, you can use a multiimage control:

Code:
<control type="multiimage">
    <left>385</left>
    <top>275</top>
    <width>1145</width>
    <height>545</height>
    <imagepath>$INFO[$INFO[Window(10000).Property(PTVL.PATH_TO_FOLDER)]]</imagepath>
    <timeperimage>3000</timeperimage>
    <fadetime>200</fadetime>
    <randomize>false</randomize>
</control>



RE: Simple multi image control? - Lunatixz - 2016-03-06

(2016-03-06, 01:11)ronie Wrote: if your script can put all 4 images in the same folder, you can use a multiimage control:

Code:
<control type="multiimage">
    <left>385</left>
    <top>275</top>
    <width>1145</width>
    <height>545</height>
    <imagepath>$INFO[$INFO[Window(10000).Property(PTVL.PATH_TO_FOLDER)]]</imagepath>
    <timeperimage>3000</timeperimage>
    <fadetime>200</fadetime>
    <randomize>false</randomize>
</control>

Hey thanks ronie for the suggestion, anyway to make it work with urls?

The images are from github ex: https://github.com/PseudoTV/PseudoTV_Skins/tree/master/Box

I want to gather all the screenshots to fade image in the below window:

Image


RE: Simple multi image control? - ronie - 2016-03-06

nope, you'd have to download them first.


RE: Simple multi image control? - Lunatixz - 2016-03-06

(2016-03-06, 02:06)ronie Wrote: nope, you'd have to download them first.

Okay, thanks anyway... I'll rotate thru the images using python.


RE: Simple multi image control? - puenktchen - 2019-05-27

(2016-03-06, 02:06)ronie Wrote: nope, you'd have to download them first.

@ronie is this still true, multiimage doesn't allow image urls at all?
I ask because the script.artwork.helper creates a virtual directory for image paths that one can use in a multiimage control to get rotating extra fanart:
Code:

def _build_list(items, handle):
    xbmcplugin.setContent(handle, 'files')
    if items:
        xbmcplugin.addDirectoryItems(handle, [_build_item(item) for item in items])
    xbmcplugin.endOfDirectory(handle)
This works for library items where the images are of course local files, but i cannot get it to work with addons where the image path is an url.