2018-05-06, 13:30
(2018-05-06, 10:10)andersfisker Wrote:(2018-05-06, 00:35)jurialmunkey Wrote:The "Just-Select" method definitely seems to be a better solution for me, as i am not using templates. The reason i did not go with it at first, is i cant figure out how to implement widget defaults, while using Just-Select. Is this possible? And if so, could you point me in the right direction?(2018-05-05, 21:21)andersfisker Wrote: Hi all,
I am in the process of implementing Skin Shortcuts in my skin. In my "home screen" i would like to have my main menu(which i have already implemented with the script) and a separate grouplist containing various widgets. The thing is that the widget grouplist, should be independent from the main menu, as it does not change - no matter which main menu item is focused. So currently i have a "dummy" menu group in the home screen, from which the widget items in the grouplist grab info from(path, target etc.). My question is, is this the proper way to implement a "widget grouplist"? It seems a bit.. hacky. And on another note, it makes the visibility conditions a bit of a mess.
Sorry if the question is confusing, it is a bit difficult to write down
Any help is appreciated, thanks!
If you are using skinshortcuts templates to build the widgets, then it might be the only way.
However, if you're not, then you might be looking for the "just select widgets" method
https://github.com/BigNoid/script.skinsh...0Select.md
This method will put all the properties in skin strings which you can then use to fill the content path and target and so on.
The main downside of this method is that you will have to make a custom dialog for management of the widgets, but with param based includes this is nowhere near as big a task as it used to be.
And thanks for the reply!
Probably the easiest way to set default widgets is to do a first run skin initialisation where the skin sets all the default skin strings and settings.
You can do this using onload conditions in Startup.xml and have a special setting to check against for the first run.
e.g.
Code:
<onload condition="!Skin.HasSetting(Initialised)">Skin.SetString(Widget1.Path,videodb://movies/titles)</onload>
<onload condition="!Skin.HasSetting(Initialised)">Skin.SetString(Widget2.Path,videodb://tvshows/titles)</onload>
<onload condition="!Skin.HasSetting(Initialised)">Skin.SetBool(Initialised)</onload>
You can even force Startup.xml to load when the user first switches to the skin (so they don't need to reset) by adding an <onunload> line in DialogConfirm.xml (because the user will be asked if they want to keep the skin when first switching to it)
e.g.
Code:
<onunload condition="!Skin.HasSetting(Initialised)">ActivateWindow(Startup)</onunload>