Problem with passing values
#1
The idea is to have different colors for each section, movies, tvshows, music, etc. I use the same view for each section. To have one view declaration and color independent I have to pass value of folder name where are textures for that color. As constant declaration is not usefull outside of numeric values in numeric parameters I can't use it in <texture> tag. So I create fake button wich has default control in myvideonav when onfocus set property and pass focus to default id=50.

in includes have declaration:

PHP Code:
<include name="ThemeColorPurple">
    <
control type="button" id="999">
        <
onfocus>SetProperty(ThemeColor,purple)</onfocus>
        <
onfocus>Control.SetFocus(50)</onfocus>
    </
control>
</include> 


in mymovienav.xml have:

PHP Code:
<include>ThemeColorPurple</include> 

and then in some view in itemlayout inside some list have:

PHP Code:
<control type="image">
    <
posx>0</posx>
    <
posy>0</posy>
    <
width>234</width>
    <
height>234</height>
    <
bordertexture>$INFO[Window.Property(ThemeColor),special://skin/media/,/holder-8x3-focus.png]</bordertexture>
    
<bordersize>12</bordersize>
    <
fadetime>100</fadetime>
    <
texture background="true" diffuse="holder-8x3-diffuse.png">$INFO[Listitem.Icon]</texture>
    <
aspectratio scalediffuse="false">stretch</aspectratio>
</
control


and it doesn't work
If I create label and put this string: "$INFO[Window.Property(ThemeColor),special://skin/media/,/holder-8x3-focus.png]" into label it display exactly path what I wont but it don't work inside bordertexture some way. There is no info in debug insted of creating property. Images are in placed. What I missed?
AsRock 330 HT, 2GB RAM, 320GB HDD, Openelec 3.2.4
Intel NUC D54250WYK, 4GB RAM, Kingston 120GB SSD, OpenELEC-Generic.x86_64-devel-20131126081257-r16438
Reply
#2
most likely you can't use infolabels for bordertextures
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
#3
So do you have any idea how can I do that?
AsRock 330 HT, 2GB RAM, 320GB HDD, Openelec 3.2.4
Intel NUC D54250WYK, 4GB RAM, Kingston 120GB SSD, OpenELEC-Generic.x86_64-devel-20131126081257-r16438
Reply
#4
Use the bordertexture in separate image control above the icon control?

PHP Code:
<control type="image"
    <
posx>0</posx
    <
posy>0</posy
    <
width>234</width
    <
height>234</height
    <
texture>$INFO[Window.Property(ThemeColor),special://skin/media/,/holder-8x3-focus.png]</texture> 
    
<bordersize>12</bordersize
    <
fadetime>100</fadetime
    <
aspectratio scalediffuse="false">stretch</aspectratio
</
control>
<
control type="image"
    <
posx>12</posx
    <
posy>12</posy
    <
width>220</width
    <
height>220</height>  
    <
fadetime>100</fadetime
    <
texture background="true" diffuse="holder-8x3-diffuse.png">$INFO[Listitem.Icon]</texture
    <
aspectratio scalediffuse="false">stretch</aspectratio
</
control
Reply
#5
Thank you for the hint. I'll try.
AsRock 330 HT, 2GB RAM, 320GB HDD, Openelec 3.2.4
Intel NUC D54250WYK, 4GB RAM, Kingston 120GB SSD, OpenELEC-Generic.x86_64-devel-20131126081257-r16438
Reply
#6
The only thing is that the border and the icon will not load the same. If I use texture with icon and textureborder, the second will load if icon is loaded. In this scenario (separate images) I probably will have lot of frames without content when scrolling. That is why I didn't use ListItem.Overlay in panel container because they loaded before icons so I have only watched marks before content is loaded. I suppose I can use smart animation effects but I can't figured it out.
AsRock 330 HT, 2GB RAM, 320GB HDD, Openelec 3.2.4
Intel NUC D54250WYK, 4GB RAM, Kingston 120GB SSD, OpenELEC-Generic.x86_64-devel-20131126081257-r16438
Reply
#7
Hmmm.... it's totaly freak. I can't get value by Window.Property(ThemeColor) from inside panel container focuslayout. It show empty. I don't know why I didn't check this yesterday. But if I put it outside panel container (the same file, a few lines below) it shows corectly value. Any suggestions? Smile
AsRock 330 HT, 2GB RAM, 320GB HDD, Openelec 3.2.4
Intel NUC D54250WYK, 4GB RAM, Kingston 120GB SSD, OpenELEC-Generic.x86_64-devel-20131126081257-r16438
Reply
#8
yeah only ListItem.blah labels will be checked and update inside panels and lists
Reply
#9
Ok, so I know what to do. I suppose it could be simpler. I have to create for each element block for each color section with sth like this <visible>StringCompare(Window.Property(ThemeColor),purple)</visible> and it will be work.
Thank you all for help.
AsRock 330 HT, 2GB RAM, 320GB HDD, Openelec 3.2.4
Intel NUC D54250WYK, 4GB RAM, Kingston 120GB SSD, OpenELEC-Generic.x86_64-devel-20131126081257-r16438
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with passing values0