2020-05-18, 03:39
(2020-05-16, 08:37)bsoriano Wrote: @pkscout, for a widget to show up as an option that you can choose when you customize the menu, it needs to be in the <widget groupings> section of the overrides.xml file in the shortcuts folder of the skin. You don’t necessarily need to have the code (actual controls) in the template.xml file, but I guess it is a good idea.Thanks for the tips. I started down the path you mentioned, but for the life of me I could not figure out the visible condition so that the PVR widget showed up only on the screen you had indicated in the settings. AZ2 has a couple "fullscreen" widgets that only work if they are the first ones in the widget list (AZ2 ignores any widget after that), so I added a TV PVR Recording Widget in the PVR area in overrides.xml with a title that indicated it had to be in the first position. Instead of ignoring any widgets after that, I just did a conditional animation to push the other widgets down the screen if the TV PVR Recording Widget was present. It works, although I have a feeling I missed a more elegant solution. But after two hours of trying to figure out where various settings are stored with Skin Shortcuts, I'm OK with that. '-)
I don’t know the code of AZ2, so I can’t just provide you a snippet you can use. What I do in Amber for that widget in particular is that I have a toggle (radio button) in the menu customization dialog (script-skinshortcuts.xml) that sets whether a menu item will have the PVR widget or not. Then, in the skin’s menu presentation code (look in includes_horizontal_home.xml and includes_vertical_home.xml) I include the pvr widget group which will be visible if the toggle (which skinshortcuts sets as a property of the menu item) is on. The code for the PVR widget is in the file includes_shelf_contents.xml, around line 639. Again, this is what I do in Amber (https://github.com/bartolomesoriano/skin.amber). You are more than welcome to look at the code and use whatever could be of help to you for AZ2.
Regards,
Bart