prl wrote: ↑Sun Jul 12, 2020 14:39
You add the widget in the code, like
self["status"] = Components.Label() and then add the corresponding widget to the screen's skin:
<widget name="status" position="..." size="..." etc, etc />.
But isn't that only in the case where we define our own skin as a class variable in our own class? Because, as soon as I add
self.skinName = ["Setup"] to my class, enigma ignores my class variable
skin, and instead uses the skin that
self.skinName = ["Setup"] points to.
What I would like to do is set
self.skinName = ["Setup"] in my class (which appears to tell enigma to use the default system skin for setup menus) and then I would like to extend that skin by adding some extra widgets to it.
An alternative idea I had was to find the location of the system setup skin, and copy the section from it where it defines what
self.skinName = ["Setup"] points to, and paste that into my own class variable
skin, and then I can remove the
self.skinName = ["Setup"] from my class.
It appears to be defined here:
It seems I will need to trace back the inheritance of those three panels and manually piece it together into a single complete skin definition to which I can then start adding extra widgets.
However I'm concerned that if I hard code it that way, my plugin will only be compatible with
easy-skin-aus-hd (for example, because it uses button_200x60_red.png, which may be specific to
easy-skin-aus-hd).
Whereas if I simply use
self.skinName = ["Setup"], then enigma will use whatever system skin happens to be implementing
<screen name="Setup"> (eg. if user selects
full-metal-wizard skin, then user will get full metal wizard's version of system setup skin).
A workaround might be to simply include all hard coded assets (such as the button png) into a subfolder in my plugin's folder, but then if the user changes their global skin to, say,
full-metal-wizard, then my plugin will still be using
easy-skin-aus-hd assets.
What I really need is to say to enigma "give me the system setup skin, but extend/override these particular widgets" like you can do in classes. I'm not sure it's possible.