Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Help adding simple function to A:Z
#1
Question 
Hello jurialmunkey/friends.

First of all thank you for great skins (Eminence included Smile)

I"m trying to add "Icon Color" function to A:Z but for some reason I can't get it to work Undecided
Can someone please point me to the error in the code or something I have missed?

This is the code:

script-skinshortcuts.xml
Code:
<!-- Home Icon Color -->              
<control type="button" id="9701" description="Home Icon Color">
  <width>100%</width>
  <height>66</height>
  <label>Icon Color</label>
  <label2>$INFO[Container(211).ListItem.Property(iconcolor)]</label2>
  <onclick>RunScript(script.skin.helper.service,action=colorpicker,shortcutproperty=iconcolor)</onclick>
  <texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
  <align>left</align>
  <include>DefSettingsButton</include>
</control>

# script-skinshortcuts.xml works like a charm

Includes_Defs.xml
Code:
<!-- Home Icon Color -->
<variable name="IconColor">
  <value condition="!IsEmpty(Container(211).ListItem.Property(IconColor))">$INFO[Container(211).ListItem.Property(IconColor)]</value>
  <value>Dark3</value>
</variable>

Includes_Home.xml
Code:
<texture colordiffuse="$VAR[IconColor]">$INFO[ListItem.Icon]</texture>

# The line from the vertical focusedlayout

the results I get in "Dark3" and not the color I have selected.
but when I enter to "Customize home menu" I can see the selected color.
also in "script-skinshortcuts-includes.xml"


Thanks in advance.
Avia.
Reply
#2
I honestly can't remember offhand if these things are case sensitive, but you're setting the property 'iconcolor' to the menu item, but checking for and using the property 'IconColor'. And when it's not that, someone knowledgeable will I'm sure be along in a minute Smile
Reply
#3
(2016-02-08, 23:47)BobCratchett Wrote: I honestly can't remember offhand if these things are case sensitive, but you're setting the property 'iconcolor' to the menu item, but checking for and using the property 'IconColor'. And when it's not that, someone knowledgeable will I'm sure be along in a minute Smile

Thank you for your response.
Just checked it still no magic. any idea?
Reply
#4
You also want to check the id of the container you're using is correct. 211 is used in script-skinshortcuts.xml as the list of all current shortcuts, but on the home page you want the ID of the main menu which will almost certainly be different.

Edit:- I have an older version of the skin installed, but in that version it's 300.
Reply
#5
How can I check it?
can you guid me to wiki page or some menual?
Reply
#6
Look in home.xml - near the top will be a line similar (or possibly identical, depending how much has changed from the version I have) like the following:-

Code:
<onload>RunScript(script.skinshortcuts,type=buildxml&amp;mainmenuID=300&amp;group=mainmenu|movieshub|episodeshub)</onload>

where the skin is telling script.skinshortcuts what the ID of the main menu is - 300 in this case.
Reply
#7
300 works! finley.

Thank you Bob thank you very much.
Reply

Logout Mark Read Team Forum Stats Members Help
Help adding simple function to A:Z0