Create a new submenu
#1
I've been trying to create a new submenu so that I can store a set of Addons in a particular category but I'm running into problems. I can get the menu entry into the home screen and I can get it to go to a sub menu but no matter what I populate the sub menu with using submenu.XML I get a blank sub menu.

I'm not near my XBMC so I can't post the code but wondered if anyone has any ideas as to what noobish thing I could be doing wrong?
Reply
#2
The most important bit here would be making sure all the visibility conditions are correct and there's no conflicting id's, but it's hard to say without seeing the code.
Reply
#3
Here's my code for the HomeMenu.xml:

<item id="14">
<label>Internet</label>
<onclick>SetFocus(1170)</onclick>
</item>

and for the HomeSubMenu.xml:

<!-- INTERNET SUBMENU ----------------------------------------------------------------------------------------------->
<control type="list" id="1170">
<posx>-800</posx>
<width>900</width>
<height>900</height>
<onup>1170</onup>
<ondown>1170</ondown>
<onleft>9000</onleft>
<orientation>vertical</orientation>
<scrolltime>150</scrolltime>
<include>home_SubFocus</include>
<include>homeMenusLayout</include>
<visible allowhiddenfocus="true">Container(9000).HasFocus(1)</visible>
<content>
<item id="1">
<label>$LOCALIZE[31052]</label>
<onclick>XBMC.ActivateWindow(MyVideoLibrary,plugin://plugin.video.apple.movie.trailers.lite,return)</onclick>
<onclick>Dialog.Close(shutdownmenu)</onclick>
<visible>Skin.HasSetting(homemenuTrailers)</visible>
</item>
<item id="2">
<label>YouTube</label>
<onclick>XBMC.ActivateWindow(MyVideoLibrary,plugin://plugin.video.youtube,return)</onclick>
<onclick>Dialog.Close(shutdownmenu)</onclick>
</item>
<item id="3">
<label>iPlayer</label>
<onclick>XBMC.ActivateWindow(MyVideoLibrary,plugin://plugin.video.iplayer,return)</onclick>
<onclick>Dialog.Close(shutdownmenu)</onclick>
</item>
</content>
</control>
Reply
#4
The submenu's visibility is determined based on what entry is selected in the main menu. You're referring to the ID "1" in your submenu, however the concerning ID in your main menu has the ID "14".
So upon first glance that seems to be the problem.
Reply
#5
At first glance it looks like you may need to change

<visible allowhiddenfocus="true">Container(9000).HasFocus(1)</visible>

to

<visible allowhiddenfocus="true">Container(9000).HasFocus(14)</visible>

edit: ninja'd! even with the phrase "at first glance" Big Grin

edit2: the forum inserts spaces before those parenthesis up there.
Reply
#6
Thanks that did it. I said I was a noob but I really do want to get into designing my own skin. I'm fine with the design element just not with the programming side Huh
Reply

Logout Mark Read Team Forum Stats Members Help
Create a new submenu0