PDA

View Full Version : Auto button bar / Skin.py patch



Huevos
09-02-18, 20:58
This piece of code (https://github.com/OpenViX/enigma2/blob/Dev/skin.py#L1055-L1057) allows skinners to create a fully automatic button bar. Once the skin is updated it will automatically show the correct buttons based on what is assigned in the python code. The code is backwards compatible so all current skins will continue to work normally, but it is advisable to update your skins to this style of button bar as it will adapt automatically to changes in the python code.

Skins already adapted:

Simple Ten Eighty
ViX Day HD
ViX Night HD
iSkin Light
iSkin Dark
Magic HD
Magic FHD
YouViX Blue
YouViX Green
YouViX Red
YouViX Purple
ViXBMC 1080 Bello
ViXBMC 1080 Confluence

Huevos
10-02-18, 08:47
How to...

Delete all the button entries from the skin file.

Create a button bar, something like this: https://github.com/OpenViX/skins/commit/85cf3e9be0fb05cb0b71e6b24732cfd7971dc957

Then to use it you can either:
1) import the button bar into your main template so the it is always imported into every screen, or,
2) use it directly in skin.xml on a screen by screen basis

IMO option 1 is best because one template controls the complete layout of every screen that uses it. And option 1 saves hundreds of entries in the skin.xml file compared to option 2.

Valiant
10-02-18, 13:25
The link to the button example above does not work - "not found" returned.

Huevos
11-02-18, 14:31
The link to the button example above does not work - "not found" returned.Try again. :thumbsup: