Trying to create custom menu item in Transparency...
#25
(2017-02-06, 16:27)fireaza Wrote: I found myself needing to re-install Kodi again today. After creating my smart playlists for my anime series, anime movies, movies and TV series, I was left to decide how to customize the menu. I tried a few of the suggested ways to create a whole new custom menu button, but again, I found this either screwed up Kodi's main menu or the background art didn't work. But as RyeHumor said, the order of the buttons is determined by the order in the "<content>" section below "<include name="VerticalMenu">/<include name="HorizontalMenu"> (depending on which setting you're using) so that was one issue I was never able to work out solved.

In the end, I figured out what I think is the simplest solution, as it involves simply editing the existing buttons. This also allows you to set a folder to be used for rotating backgrounds though Kodi's options as normal, I couldn't work out how to do this by editing the Includes_Home.xml file. So here's the process:

1) Create your smart playlists for the menu items you want. This includes the stock menus (Movie, TV Shows etc) as well as the menu items that will be assigned to the "custom" menu options in Kodi. In my case, this is my two anime menus.

2) Mark the playlists you want to assign to your "custom" menus as favorites, then go into Transparency's configuration and assign these favorites to your custom menus. This ensures the menus will have names, if you don't do this beforehand, you'll have working menus, but they will be blank.

3) Open up your Includes_Home.xml file and find the "<include name=" section for the menu you want to edit (i.e "<include name="HomeMoviesButton">"). Then simple replace the "<onclick>BLAH BLAH BLAH BLAH</onclick>" line with "<onclick>ActivateWindow(Videos,"special://profile/playlists/video/NAMEOFYOURPLAYLISTHERE.xsp", return)</onclick>"

4) Do this for all the smart playlists you made. In my case, that's movies, TV series and custom1 and custom2 (my two anime menus).

5) Scroll down to "<include name="VerticalMenu">/<include name="HorizontalMenu"> (depending on if you're using a horizontal or vertical menu) and look for the "<content>" section. The part with the "<include condition="Skin.HasSetting" lines. Simply cut and paste the line that belongs to the menu you want and paste to to where you want. For example, I want my "Anime Movies" and "Anime Series" to appear first. These are "HomeCustom1Button" and "HomeCustom2Button" so this is how mine begins:

<content>
<include condition="Skin.HasSetting(Menu_Custom1)">HomeCustom1Button</include>
<include condition="Skin.HasSetting(Menu_Custom2)">HomeCustom2Button</include>

That's it! Doing this will allow you to choose a folder to use for backgrounds though Transparency's settings menu as normal, so you can still get rotating backgrounds even with a custom menu button.
I wanted to add a link to an Android app. ie. Send the Live TV to my Android IPTV app. (Shield)
So I add the link via to the IPTV app the submenu option first.
Then I searched the includes-home.xml for the code that was linking to the Android app.
I then copied it and pasted it into the Live TV section. So when I click Live TV on the main menu it launches my IPTV app.
Thanks for all of the guidance here. It really helped me solve my 3 custom menu item limit.
Now I have IPTV app link. Amazon, Disney+ and Netflix custom links. Perfect system.
Reply


Messages In This Thread
RE: Trying to create custom menu item in Transparency... - by sreeslinux - 2021-01-26, 23:33


Logout Mark Read Team Forum Stats Members Help
Trying to create custom menu item in Transparency...0
This forum uses Lukasz Tkacz MyBB addons.