Okay, I have had a few PM regarding this, so here it goes. You'll need to modify Confluence\720p\home.xml to add/remove change home menu items.
FYI, when you upgrade the skin or XBMC (which currently includes the skin) your home.xml file will be overwritten. So after you make your edits, be sure to make a backup somewhere safe so you can re-apply your edits after such an upgrade.
I did all these edits on my own, hopefully JezzX will chime in if I did something blatantly wrong. The code for the page is broken down into groups of on screen items, so it is pretty easy to find what you need once you know what to look for. You'll see comments before some of these groups which look like:
the
<!-- opens a comment and the
--> closes it. Anything between those tags is a comment and not considered code for the menu. You may want to add in your own comments. If you plan on removing menu items I recommend you do it with these comment notations so you can easily put the item back if you change your mind. I use Notepad++ to do my edits, which is nice because all the tags and comments are color coded making it easier to understand what you are looking at.
The submenu items for each main menu item start at:
Code:
<control type="group" id="9001">
For me this is line 396, but I have already done some editing which may have changed this line number slightly. Just use the search feature to fine the line of code above.
The main menu items starts with:
Code:
<content>
<item id="8">
<label>247</label>
<onclick>ActivateWindow(Scripts)</onclick>
<icon>special://skin/backgrounds/scripts.jpg</icon>
<thumb>$INFO[Skin.String(Home_Custom_Back_Scripts_Folder)]</thumb>
<visible>!Skin.HasSetting(HomeMenuNoScriptsButton)</visible>
</item>
Anything you do to the main menu needs to stay between the <content> and </content> tags.
The whole main menu group actually starts at line 732:
Code:
<control type="fixedlist" id="9000">
You'll see reference to the id 9000 later.
I am not an XBMC skinner so I will explain these xml tags as I understand them.
item id="8"
I'm not sure exactly how item id's are used but each menu item should have it's own id. So if you add a new menu item, make sure it has it's own id number.
<label>247</label>
This is the text label you see for the item in the menu. The number relates to a specific word in the language string.xml files. This is so each language will see the proper translated word. I usually just type in the actual word I want to see as I am not worried about my menu items being used by a foreign language. For example I may make a menu item for internet applications and call it, <label>Web</label>.
<onclick>ActivateWindow(Scripts)</onclick>
This tells XBMC what to do when you select the menu item. You can actually stack multiple <onclick></onclick> actions to have XBMC do multiple things when you select the item. Just make a new line for each <onclick></onclick> action. In this case XBMC is going to open the Scripts screen. If you look through the home.xml file you'll see many of the native commands XBMC can execute. You can also look in the wiki for more commands. One I use a lot is;
Code:
<onclick>XBMC.System.Exec("D:\Communications\Firefox\firefox.exe" "https://mail.google.com/mail/" -p karl)</onclick>
XBMC.Sytem.Exec tells XBMC to launch an external application. When it does so, XBMC minimizes then restores itself when the external application is closed. In this case it launches Firefox with the extra parameter to use my profile.
<icon>special://skin/backgrounds/scripts.jpg</icon>
This is the image to use in a menu list that supports showing an icon. In this case of the main menu it is the default background image you see that changes.
<thumb>$INFO[Skin.String(Home_Custom_Back_Scripts_Folder)]</thumb>I am not sure about this, but I think this is based on the skin settings and covers over the default icon image set above when you choose a custom background image. If you are adding you own menu item chances are you wont need this line unless you plan on also editing the skins options. I'd recommend just copying another menu items <thumb> code that has similar images that could work for you new item.
<visible>!Skin.HasSetting(HomeMenuNoScriptsButton)</visible>This tells XBMC to show the menu item or not. If you leave out the <visible></visible> line the menu item will default to showing. I believe you can just put true, false, or as in this case, the value of a skin setting or other such code. You can see other code such as:
Code:
<visible>Library.HasContent(Music)</visible>
or
Code:
<visible>!Library.HasContent(Music)</visible>
These, I think show or hide the menu item based on if there is content in the music library. You'll find this code used in the sub-menu items.
Adding a new main menu item:
The easiest way to do it is to copy another menu items code from <item> to </item>. The menu items show up in the order they are in the code, so insert it where you want to see it. Make sure you change the item id to a new unused number. Then edited the other lines as needed.
Adding the sub-menu arrow graphic (the little arrow indicating there is a submenu).
Starting at line 777 you'll see:
Code:
<control type="image">
<posx>370</posx>
<posy>63</posy>
<width>18</width>
<height>18</height>
<texture>HomeHasSub.png</texture>
<visible>Container(9000).HasFocus(2) | Container(9000).HasFocus(3) | Container(9000).HasFocus(5) | Container(9000).HasFocus(7) | Container(9000).HasFocus(9) | [Container(9000).HasFocus(8) + [[Skin.HasSetting(HomeScriptButton1) + !IsEmpty(Skin.String(HomeScriptButton1_label))] | [Skin.HasSetting(HomeScriptButton2) + !IsEmpty(Skin.String(HomeScriptButton2_label))] | [Skin.HasSetting(HomeScriptButton3) + !IsEmpty(Skin.String(HomeScriptButton3_label))] | [Skin.HasSetting(HomeScriptButton4) + !IsEmpty(Skin.String(HomeScriptButton4_label))] | [Skin.HasSetting(HomeScriptButton5) + !IsEmpty(Skin.String(HomeScriptButton5_label))] | [Skin.HasSetting(HomeScriptButton6) + !IsEmpty(Skin.String(HomeScriptButton6_label))]]] | Container(9000).HasFocus(10) | Container(9000).HasFocus(11)</visible>
<animation effect="fade" start="0" end="100" time="200">Focus</animation>
<animation effect="fade" start="100" end="0" time="200">UnFocus</animation>
</control>
Line 783 with the <visible></visible> tags tell the graphic when to show up. The various conditions are seperated with the | symbol. The first one is
Container(9000).HasFocus(2), which says when the item id of 2 in the control list 9000 is focused, the graphic will show. The main menu control is 9000 (I told you earlier you'd see these number again). So for this code when the main menu item "video" is focused you will see the graphic. I added
| Container(9000).HasFocus(1) to my list of conditionals as I added sub-menu items to Programs.
continued at post
#11.