Colordiffuse for itemlayout ?
#1
Hey, I Have white icons which I want to colordiffuse in the same color as the text color. they are inside a list control (skin.shortcuts)
ListItem.Property(TextColor) - is the text color (FFRGB format)

for the label this:
Code:
<label>[COLOR=$INFO[ListItem.Property(TextColor)]]$INFO[ListItem.Label][/COLOR]</label>
is working fine

as for the icon, in the focused layout no problem, but in the itemlayout I need a little help:
Code:
<texture background="true" colordiffuse="$INFO[ListItem.Property(TextColor)]">$INFO[ListItem.Thumb]</texture>
this one is not working, because I guess $INFO is not supported in colordiffuse right?
but if I create a VAR with this INFO, it is working, but effect all the items...and not each one seperatly.
there is any workaround to make it work?
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#2
although Here I see that $INFO should work for colordiffuse:
http://forum.kodi.tv/showthread.php?tid=...pid1437421

and I tried :
Code:
colordiffuse="$INFO[Skin.String(some_string)]"
and It worked, so why:
Code:
colordiffuse="$INFO[ListItem.Property(TextColor)]"

isnt?
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#3
Tried?

Code:
colordiffuse="$INFO[Container(ID).ListItem.Property(TextColor)]"
Reply
#4
Yes, and its working same as VAR - color all the the items with the current focused item. instead of each one with his color.
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#5
Just to share, I also hardly tried to use strings, but without success..
use Skin.Setstring in the skinshortcuts dialog when I choose the color, and define it to "menu_labelID" and then in the colordiffuse use the right string...
but It seems that its not possible to use $INFO inside $INFO[Skin.String()] - it just wont work.
so I couldnt use something like: colordiffuse="$INFO[Skin.String(menu_$INFO[...(labelID)])]" because of that reason..

I found a very messy workarround - to use the actual color in the "colordiffuse" and add "visible" condition to that color using StringCompare, but it require to create a tons of controls (256 rgb values)

So I still asking for help here..
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#6
(2015-08-11, 00:11)tomer953 Wrote: Just to share, I also hardly tried to use strings, but without success..
use Skin.Setstring in the skinshortcuts dialog when I choose the color, and define it to "menu_labelID" and then in the colordiffuse use the right string...
but It seems that its not possible to use $INFO inside $INFO[Skin.String()] - it just wont work.
so I couldnt use something like: colordiffuse="$INFO[Skin.String(menu_$INFO[...(labelID)])]" because of that reason..

I found a very messy workarround - to use the actual color in the "colordiffuse" and add "visible" condition to that color using StringCompare, but it require to create a tons of controls (256 rgb values)

So I still asking for help here..

Maybe try

colordiffuse="$INFO[Skin.String(menu_$PARAM(LabelID))]

With param value = $INFO[...(labelID)]

I use this trick many times when properties are failing. Advantage of $PARAM is that it's resolved first so it places the correct value directly in place of $PARAM. Works fine for first value of Stringcompare for exemple.

Just a thought
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#7
What happens if you move the colordiffuse out?

eg

Code:
<colordiffuse>$INFO[ListItem.Property(TextColor)]</colordiffuse>
<texture background="true">$INFO[ListItem.Thumb]</texture>
Reply
#8
Tried, same results

Edit:jay i saw now your message, ill try
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#9
(2015-08-11, 20:34)Jayz2K Wrote:
(2015-08-11, 00:11)tomer953 Wrote: Just to share, I also hardly tried to use strings, but without success..
use Skin.Setstring in the skinshortcuts dialog when I choose the color, and define it to "menu_labelID" and then in the colordiffuse use the right string...
but It seems that its not possible to use $INFO inside $INFO[Skin.String()] - it just wont work.
so I couldnt use something like: colordiffuse="$INFO[Skin.String(menu_$INFO[...(labelID)])]" because of that reason..

I found a very messy workarround - to use the actual color in the "colordiffuse" and add "visible" condition to that color using StringCompare, but it require to create a tons of controls (256 rgb values)

So I still asking for help here..

Maybe try

colordiffuse="$INFO[Skin.String(menu_$PARAM(LabelID))]

With param value = $INFO[...(labelID)]

I use this trick many times when properties are failing. Advantage of $PARAM is that it's resolved first so it places the correct value directly in place of $PARAM. Works fine for first value of Stringcompare for exemple.

Just a thought

Can you guide me how to call it exactly ? I tried:
Code:
<colordiffuse>$INFO[Skin.String(menu_$PARAM(labelID))]</colordiffuse>

Code:
<include name="labelID">
    <param name="labelID" value="$INFO[ListItem.Property(labelID)]"/>
</include>

But its not working

Also tried:
Code:
<include name="foo">
        <control type="image">
            <height>57</height>
            <width>10</width>
            <texture colordiffuse="$INFO[Skin.String(menu_$PARAM(boo))]" background="true">white.png</texture>
        </control>
    </include>
in the includes.xml file and:
Code:
<include name="foo">
                        <param name="boo" value="$INFO[Container(9000).ListItem.Property(labelID)]" />
                    </include>
inside the itemlayout part...
I always check ListItem and Container(9000).Listitem, they both returns nada
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#10
For first attempt you need to call the include

Include def
Code:
<include name="Mytest">
     <colordiffuse>$INFO[Skin.String(menu_$PARAM(labelID))]</colordiffuse>
</include>

Include call in the list
Code:
<include name="Mytest">
     <param name="labelID" value="$INFO[ListItem.Property(labelID)]"/>
</include>

... But second one seems OK
Complete code is always better.

Have you checked that your ListItem.Property is returning correct value with just placing it like a label in your list ?
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#11
A simple test scenario to reproduce would be extremely handy Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#12
Code:
$INFO[ListItem.Property(TextColor)]
inside "label" return the textcolor as it should (FFRGB type) - each item has his own color.

The $PARAM Trick is not working...
I Tried different things, even tried to manually Set string to some color, like:
Skin.SetString(menu_movies,FFd2d2d2) and then test the param with:
Code:
<control type="image">
                        <texture background="true">white.png</texture>
                        <include name="Mytest">
                            <param name="labelID" value="movies"/>
                        </include>
</control>
(as you can see I put "movies" in the value just to test... of course I tried $INFO with labelID first...
and the include:
Code:
<include name="Mytest">
<colordiffuse>$INFO[Skin.String(menu_$PARAM(labelID))]</colordiffuse>
</include>
and its not working.....
mkortstiege, I am using list id 9000 with skin.shortcuts, and trying to colordiffuse "white.png" texture (simple 4x4 white.png file) with property that contains FFRGB value... or with skin string that include that...
I don't know how to give you some test code to do the same without the whole script, but I will try later to think about something...
I think everyone here can put a new Image control in his own skin main menu, white white texture, and try to colordiffuse it with some string or property...


and it
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#13
Will check.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#14
Gave it a quick shot in my home menu and have the same result. Using skin.string or var in itemlayout return the focusedlayout item's property value. Param doesn't work at all for this one.
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#15
mkortstiege - Thanks...
Jay, I also tried very basic test before messing with all the $INFO and stuff, and it seems like colordiffuse just don't work with $PARAM, I tried this one:
Code:
<include name="Mytest">
    <texture colordiffuse="$PARAM(noob)">white.png</texture>
</include>
Code:
<control type="image">
<include>image_size</include>
<include name="Mytest">
    <param name="noob" value="red" />
</include>
</control>
not working...

I just need to think about some trick to make this: http://forum.kodi.tv/showthread.php?tid=...pid2076341 to work seperatly for each menu and not for all of them.. arr
Phenomenal™ Skin • ForumWebsiteGitHub
Reply

Logout Mark Read Team Forum Stats Members Help
Colordiffuse for itemlayout ?0