Kodi Community Forum
Help adding simple function to A:Z - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67)
+---- Forum: Arctic: Zephyr - Reloaded (https://forum.kodi.tv/forumdisplay.php?fid=221)
+---- Thread: Help adding simple function to A:Z (/showthread.php?tid=259283)



Help adding simple function to A:Z - xAyx - 2016-02-08

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.


RE: Help adding simple function to A:Z - BobCratchett - 2016-02-08

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


RE: Help adding simple function to A:Z - xAyx - 2016-02-08

(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?


RE: Help adding simple function to A:Z - BobCratchett - 2016-02-08

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.


RE: Help adding simple function to A:Z - xAyx - 2016-02-08

How can I check it?
can you guid me to wiki page or some menual?


RE: Help adding simple function to A:Z - BobCratchett - 2016-02-08

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.


RE: Help adding simple function to A:Z - xAyx - 2016-02-09

300 works! finley.

Thank you Bob thank you very much.