Problem with wraplist
#1
Hi, I try coding for the first time right now, and I just can't figure out why the images in this wraplist do not show. The images are in the folder and if I use <texture> instead of <info> and enter the file name directly it works. Would be very thankful for help, prob. a very dumb mistake of mine.

Code:
<control type="wraplist" id="107">
    <posx>0</posx>
    <posy>0</posy>
    <width>1920</width>
    <height>300</height>
    <onleft>107</onleft>
    <onright>107</onright>
    <focusposition>2</focusposition>
    <scrolltime>200</scrolltime>
    <orientation>horizontal</orientation>
    <itemlayout height="200" width="384" >
        <control type="image">
            <height>100</height>
            <width>100</width>
            <posx>192</posx>
            <posy>0</posy>
            <info>ListItem.Icon</info>
        </control>
    </itemlayout>
    <focusedlayout height="300" width="384">
        <control type="image">
            <height>100</height>
            <width>100</width>
            <posx>192</posx>
            <posy>0</posy>
            <info>ListItem.Icon</info>
        </control>
    </focusedlayout>
    <content>
        <item id="1">
            <icon>DefaultVideo.png</icon>
        </item>
        <item id="2">
            <icon>DefaultVideo.png</icon>
        </item>
        <item id="3">
            <icon>DefaultVideo.png</icon>
        </item>
        <item id="4">
            <icon>DefaultVideo.png</icon>
        </item>
        <item id="5">
            <icon>DefaultVideo.png</icon>
        </item>
        <item id="6">
            <icon>DefaultVideo.png</icon>
        </item>
        <item id="7">
            <icon>DefaultVideo.png</icon>
        </item>
        <item id="8">
            <icon>DefaultVideo.png</icon>
        </item>
    </content>
</control>
Reply
#2
Try removing height from item- and focusedlayout.
Reply
#3
if i'm not mistaken it's mandatory to add a <onclick> to every <item> in the <content> section.

try with:
Code:
<item id="1">
    <icon>DefaultVideo.png</icon>
    <onclick>-</onclick>
</item>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Thanks for the answers, but both didn't work Sad I'm really confused because the onclick event (in my case a setfocus to another wraplist with labels) works.
Reply
#5
Have you tried
Code:
<texture>$INFO[ListItem.Icon]</texture>
?
Reply
#6
Sorry, doesn't work either, don't know what I'm doing wrong.
Reply
#7
That code looks similiar to how Alaska's HomeIcon view is, this is Alaska's code maybe it'll help


PHP Code:
<control type="fixedlist" id="300">
            <
posx>-131</posx>
            <
posy>130</posy>
            <
height>500</height>
            <
width>1541</width>
            <
onleft>300</onleft>
            <
onright>300</onright>
            <
viewtype>list</viewtype>
            <
orientation>horizontal</orientation>
            <
focusposition>2</focusposition>
            <
scrolltime>200</scrolltime>
            <include>
Animation_ZoomedByMenu</include>
            <include>
Animation_ZoomOutZoomIn</include>
            <
itemlayout width="300" height="341">
                <
control type="image">
                    <
width>171</width>
                    <
height>171</height>
                    <
posx>50</posx>
                    <
posy>91</posy>
                    <
texture>$INFO[ListItem.Icon]</texture>
                </
control>
            </
itemlayout>
            <
focusedlayout width="341" height="341">
                <
control type="image">
                    <
width>341</width>
                    <
height>341</height>
                    <
posx>0</posx>
                    <
posy>0</posy>
                    <
animation type="Focus" reversible="false">
                        <
effect type="zoom" center="171,171" tween="back" easing="out" time="500" start="50" end="100" />
                    </
animation>
                    <
texture>$INFO[ListItem.Icon]</texture>
                </
control>
            </
focusedlayout>
            <
content>
                <
item id="1">
                    <
description>Videos</description>
                    <
label>3</label>
                    <
icon>homeicons/videosicon.png</icon>
                    <
onclick>ActivateWindow(VideoFiles)</onclick>
                    <
visible>!Skin.HasSetting(novideos)</visible>
                </
item>
                <
item id="2">
                    <
description>Music</description>
                    <
label>2</label>
                    <
icon>homeicons/musicicon.png</icon>
                    <
onclick>ActivateWindow(Music)</onclick>
                    <
visible>!Skin.HasSetting(nomusic)</visible>
                </
item
Reply
#8
D0nR0sa Wrote:Sorry, doesn't work either, don't know what I'm doing wrong.

your code works fine on my end (after adding <onclick>)...
maybe the 'id' of the wraplist conflicts with something else?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
Hmm, no the id is fine, tried around 15 random other ids between 10 and 15000 and none did it, also I can trigger the onclick event and see text if I replace the image controls with labels(and edit the content). Maybe my xbmc is broken? shouldn't be, because everything else runs just fine. I will try again tomorrow.
Reply
#10
Ok, because even copying the part of the alaska file without the includes into my file didn't work, I figured something with my whole xml file must be wrong,
So I decided to post it here, maybe someone finds something, if not I'll give up and might try something else.
Code:
<window id="0">
<defaultcontrol always="true">101</defaultcontrol>
<allowoverlay>yes</allowoverlay>
    <controls>
        <control type="group" id="101">
        <defaultcontrol always="true">102</defaultcontrol>
        <description>Group for Home Window visible part</description>
            <posx>0</posx>
            <posy>0</posy>
            <height>1080</height>
            <width>1920</width>
            <control type="group" id="102">
                <defaultcontrol always="true">105</defaultcontrol>
                <description>Group for Main Menu</description>
                <posx>0</posx>
                <posy>850</posy>
                <height>230</height>
                <width>1920</width>
                <control type="image" id="103">
                        <texture>mainmenu_bg.png</texture>
                        <posy>0</posy>
                        <posx>0</posx>
                        <width>1920</width>
                        <height>230</height>
                    </control>
                <control type="rss" id="104">
                        <posx>0</posx>
                        <posy>10</posy>
                        <width>1920</width>
                        <font>Small</font>
                        <urlset>1</urlset>
                        <titlecolor>Red</titlecolor>
                        <headlinecolor>White</headlinecolor>
                        <textcolor>White</textcolor>
                    </control>
                <control type="wraplist" id="105">
                    <description>TextMenu</description>
                    <posx>0</posx>
                    <posy>30</posy>
                    <width>1920</width>
                    <height>230</height>
                    <onleft>105</onleft>
                    <onup>SetFocus(107)</onup>
                    <onright>105</onright>
                    <focusposition>2</focusposition>
                    <scrolltime>200</scrolltime>
                    <orientation>horizontal</orientation>
                    <itemlayout height="230" width="384" >
                        <control type="label">
                            <height>230</height>
                            <posx>192</posx>
                            <width>384</width>
                            <info>ListItem.Label</info>
                            <textcolor>White</textcolor>
                            <scroll>false</scroll>
                            <align>center</align>
                            <aligny>center</aligny>
                        </control>
                    </itemlayout>
                    <focusedlayout height="230" width="384">
                        <control type="label">
                            <height>230</height>
                            <posx>192</posx>
                            <width>384</width>
                            <info>ListItem.Label</info>
                            <font>Large</font>
                            <textcolor>White</textcolor>
                            <align>center</align>
                            <aligny>center</aligny>
                        </control>
                    </focusedlayout>
                    <content>
                        <item id="1">
                            <description>Videos</description>
                            <label>$LOCALIZE[3]</label>
                            <onclick>xbmc.activatewindow(6)</onclick>
                        </item>
                        <item id="2">
                            <description>Music</description>
                            <label>$LOCALIZE[2]</label>
                            <onclick>xbmc.activatewindow(5)</onclick>
                        </item>
                        <item id="3">
                            <description>Pictures</description>
                            <label>$LOCALIZE[1]</label>
                            <onclick>xbmc.activatewindow(2)</onclick>
                        </item>
                        <item id="4">
                            <description>Programs</description>
                            <label>$LOCALIZE[0]</label>
                            <onclick>xbmc.activatewindow(1)</onclick>
                        </item>
                        <item id="5">
                            <description>Favourites</description>
                            <label>$LOCALIZE[1036]</label>
                            <onclick>xbmc.activatewindow(favourites)</onclick>
                        </item>
                        <item id="8">
                            <description>Scripts</description>
                            <label>$LOCALIZE[247]</label>
                            <onclick>xbmc.activatewindow(Scripts)</onclick>
                        </item>
                        <item id="6">
                            <description>Weather</description>
                            <label>$LOCALIZE[8]</label>
                            <onclick>xbmc.activatewindow(2600)</onclick>
                            <visible>System.HasNetwork</visible>
                        </item>
                        <item id="7">
                            <description>Files</description>
                            <label>$LOCALIZE[7]</label>
                            <onclick>xbmc.activatewindow(3)</onclick>
                        </item>
                        <item id="9">
                            <description>Settings</description>
                            <label>$LOCALIZE[5]</label>
                            <onclick>xbmc.activatewindow(settings)</onclick>
                        </item>
                        <item id="10">
                            <description>Refresh</description>
                            <label>$LOCALIZE[184]</label>
                            <onclick>XBMC.ReloadSkin()</onclick>
                        </item>
                    </content>
                </control>
            </control>
            <control type="group" id="106">
                <defaultcontrol always="true">107</defaultcontrol>
                <posx>0</posx>
                <posy>150</posy>
                <height>300</height>
                <width>1920</width>
                <control type="wraplist" id="107">
                    <posx>0</posx>
                    <posy>0</posy>
                    <width>1920</width>
                    <height>300</height>
                    <onleft>107</onleft>
                    <onright>107</onright>
                    <ondown>105</ondown>
                    <focusposition>2</focusposition>
                    <scrolltime>200</scrolltime>
                    <orientation>horizontal</orientation>
                    <itemlayout height="200" width="384" >
                        <control type="image">
                            <height>200</height>
                            <width>100</width>
                            <posx>192</posx>
                            <posy>0</posy>
                            <texture>$INFO[ListItem.Icon]</texture>
                        </control>
                    </itemlayout>
                    <focusedlayout height="300" width="384">
                        <control type="image">
                            <height>200</height>
                            <width>100</width>
                            <posx>192</posx>
                            <posy>0</posy>
                            <texture>$INFO[ListItem.Icon]</texture>
                        </control>
                    </focusedlayout>
                    <content>
                        <item id="1">
                            <icon>DefaultVideo.png</icon>
                            <onclick>-</onclick>
                        </item>
                        <item id="2">
                            <icon>DefaultVideo.png</icon>
                            <onclick>-</onclick>
                        </item>
                        <item id="3">
                            <icon>DefaultVideo.png</icon>
                            <onclick>-</onclick>
                        </item>
                        <item id="4">
                            <icon>DefaultVideo.png</icon>
                            <onclick>-</onclick>
                        </item>
                        <item id="5">
                            <icon>DefaultVideo.png</icon>
                            <onclick>-</onclick>
                        </item>
                        <item id="6">
                            <icon>DefaultVideo.png</icon>
                            <onclick>-</onclick>
                        </item>
                        <item id="7">
                            <icon>DefaultVideo.png</icon>
                            <onclick>-</onclick>
                        </item>
                        <item id="8">
                            <icon>DefaultVideo.png</icon>
                            <onclick>-</onclick>
                        </item>
                    </content>
                </control>
            </control>
        </control>
    </controls>
</window>
Reply
#11
i've copied the code to Confluence's Home.xml
and the icons display just fine...
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#12
ronie Wrote:i've copied the code to Confluence's Home.xml
and the icons display just fine...

Same here, it's working fine.
Reply
#13
hmm, odd if I copy it to the confluence xml it seems to work at least partially, but in it's own skin directory it doesn't work. Maybe a problem with running it without xpr?
Reply
#14
No, I tried without XPR in another skin, worked just fine... don't know what's wrong there.
Reply
#15
Hmm, very weird ,tried everything I could think of. I will stop it though, was just a try to see if I understand skinning. I think I do, but somehow my computer doesn't seem to like me Big Grin Thanks for all your replies,
D0nR0sa
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with wraplist0