Kodi Community Forum

Full Version: Submenus as widget
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a way to use a submenu as a widget?
I've seen the option in some other skins (Titan being one of them), so hopefully it's do-able, if someone can point me in the right direction
Not currently possible, I'll look into it when I get a chance though.

Update: Looked at Titan's overrides.xml, but don't see how he is doing that...
I got it to work (seems OK so far anyway)
Created a widget as normal, then go back into Select widget, Custom Item, and change to:
$INCLUDE[skinshortcuts-submenu]
Hmm, tried this but nothing shows up for me.
Looks like it works in Mimic 3 Jarvis, but not with 5/krypton.
Is there any way to force Mimic 3 to install on Krypton?
(2017-02-26, 18:01)endee1 Wrote: [ -> ]Looks like it works in Mimic 3 Jarvis, but not with 5/krypton.
Is there any way to force Mimic 3 to install on Krypton?
No way to install the old version in Krypton.
Be great if this could be included in the future if it's possible. I've been poking around in other skins to try and figure out how it works with no luck so far.
I'm using Super favorites folders widgets as a workaround for now
Thanks for replies
If you figure out a way to display the submenu items as a widget, let me know and I'll add it.
I just added this feature to my skin by reverse engineering how Titan was generating the code. You can either add ",static" onto the end of your ||BROWSE||script.skin.helper.service... string in overrides.xml or one additional line linked below. If you use the ",static" route, be aware that it will also add links for Weather and System Info that you will need to account for.

https://github.com/bumpaneer/skin.unity/...des.xml#L7

Edit: I believe I should point out this will only work if you are using skinshortcuts to generate the submenu.

Edit 2: Looking through your addon.xml it doesn't appear that script.skin.helper.service is a requirement of your skin, so you may need to adjust the label in the line I linked. The only reason I have the condition there is to take advantage of the already existing label, since the skin helper script is already a dependency of my skin.
(2017-03-08, 21:53)Bumpaneer Wrote: [ -> ]I just added this feature to my skin by reverse engineering how Titan was generating the code. You can either add ",static" onto the end of your ||BROWSE||script.skin.helper.service... string in overrides.xml or one additional line linked below. If you use the ",static" route, be aware that it will also add links for Weather and System Info that you will need to account for.

https://github.com/bumpaneer/skin.unity/...des.xml#L7

Edit: I believe I should point out this will only work if you are using skinshortcuts to generate the submenu.

Edit 2: Looking through your addon.xml it doesn't appear that script.skin.helper.service is a requirement of your skin, so you may need to adjust the label in the line I linked. The only reason I have the condition there is to take advantage of the already existing label, since the skin helper script is already a dependency of my skin.
Thanks Bumpaneer! Still doesn't seem to work here though. Thought it was because I wasn't using widget groupings, but it still didn't work after adding them.
The code from Bumpaneer works great to add the menu option for submenu widgets, but I still can't get it to display.

Wasted many hours hacking around, I now have a new found respect for all you skinners out there!!
One thing I did find that might help someone with a bit more skin knowledge than me - I was comparing code in Arctic Zephyr with Mimic. If I copy the full shortcuts\template.xml file from AZ into Mimic it does actually display the submenu widget (obviously in a messed up way with no icons/text, but its there and works with a mouse to select widget). But I can't figure out what's in that file that gets the widget to display

Image
It appears to be caused by how you are generating your widgets. Because your widget uses parameters to pass the variables to the include, you end up trying to pass an include as a parameter. I'm not sure if that is valid.

Code:
<param name="path">
    <include>skinshortcuts-submenu</include>
</param>
In that case, I probably won't be implementing submenu widgets. It's not something I would ever use anyway, as submenus are intended to be displayed in the same location as the main menu in Mimic.
Got it working.
Simple in the end it seems, I have to doublecheck with a clean install because I've been hacking around a lot and it's possible there are other changes I've made.
Added to \1080i\includes_widgetcontent.xml after <include name="WidgetContents">

Code:
    <content>
    <include>skinshortcuts-submenu</include>
    </content>
(2017-03-10, 19:26)endee1 Wrote: [ -> ]Got it working.
Simple in the end it seems, I have to doublecheck with a clean install because I've been hacking around a lot and it's possible there are other changes I've made.
Added to \1080i\includes_widgetcontent.xml after <include name="WidgetContents">

Code:
    <content>
    <include>skinshortcuts-submenu</include>
    </content>
Does this just change all of your widgets to display the submenu items? Doesn't seem like this would be a solution for most users...
Pages: 1 2