Hi Littlesat,
Actually now we get to the 'point' and difficulty....
In the skin xml above we currently left with ButtonTemplateConditional and ButtonTemplateConditional_S... I would simply remove Conditional from the name of the template....
No, those two could also be combined into a single template.
If you add the control mechanism for the other buttons then they too could be folded into the single template. It could look something like:
<screen name="ButtonTemplate">
<panel name="ButtonTemplate_R" conditional="key_red"/>
<panel name="ButtonTemplate_G" conditional="key_green"/>
<panel name="ButtonTemplate_Y" conditional="key_yellow"/>
<panel name="ButtonTemplate_B" conditional="key_blue"/>
<panel name="KeyMenuTemplate" conditional="key_menu"/>
<panel name="KeyInfoTemplate" conditional="key_info"/>
<panel name="KeyZeroTemplate" conditional="key_zero"/>
<panel name="KeyOkTemplate" conditional="key_ok"/>
<panel name="KeyOneTemplate" conditional="key_one"/>
<panel name="KeyTextTemplate" conditional="key_text"/>
<panel name="KeyTextTemplateBlue" conditional="key_textblue"/>
<panel name="KeyExit" conditional="key_exit"/>
</screen>
where for, as an example, for the RED button you have:
<screen name="ButtonTemplate_R">
<ePixmap pixmap="PLi-FullNightHD/buttons/red.png" position="192,1032" size="34,34" alphatest="blend"/>
<widget source="key_red" render="Label" position="242,1030" size="370,38" backgroundColor="darkgrey" zPosition="2" transparent="1" foregroundColor="grey" font="Regular;34" halign="left"/>
<widget name="key_red" position="242,1030" size="370,38" backgroundColor="black" zPosition="1" transparent="1" font="Regular;34" halign="left"/>
</screen>
This ONE button template panel could be used for ALL screens that require a standard button template.
In the example of the RED button above you should note that backward compatibility is maintained because all the Label(), Button() and StaticText() functions can and will be rendered on the screen. Nothing should break if the code if fixed as per Huevos' requests.
Regards,
Ian.
Edited by IanSav, 17 January 2018 - 13:21.