Skin me...‎ > ‎

Menu in OE2.0 skin

The new way to show menu-entry, icons and description.



In OE2.0 there is made a new way that can be used
the old way still works.!!!

If you want to use this there is no need for menu screen names: screen name="menu_something in your skin.

New is a call for description from the associated python files
its the same known from PluginDescriptor in a plugin.py 
and the new call for menu icon is made very easy with the new renders Listbox and Pixmap.

The new menu makes calls for three items.
  • Menu entry name =  MultiContentEntryText
  • Menu entry icon =  MultiContentEntryPixmapAlphaBlend
  • Menu entry description =   MultiContentEntryText

You only have to add the menu-icon in a folder named menu in the skin folder.
The menu-icons must have the entryID name that's used in menu.xml or associated python files.

You can also add the menu-icons in a folder in: /usr/share/enigma2/menu
menu-icons stored there can be used in all skin, if there is a menu-icon in /usr/share/enigma2/skin-name/menu
it is the one that is going to be used.

You can find a list of menu-icon entryID's here: Menu icon names
The new way to show name, icons and description.
<!-- Menu -->
<screen name="Menu" position="center,center" size="650,500" title="Main menu" flags="wfNoBorder">
<ePixmap pixmap="Default-HD/menu-bg.png" position="0,0" size="650,500" zPosition="-1" alphatest="on"/>
<widget source="title" render="Label" position="15,9" size="620,30" zPosition="1" font="Regular;26" backgroundColor="#16244b" transparent="1"/>
<widget source="menu" render="Listbox" position="255,50" size="390,440" zPosition="1" scrollbarMode="showOnDemand" >
<convert type="TemplatedMultiContent">
{"template": [ MultiContentEntryText(pos = (10, 8), size = (370, 26), text = 0) ],
"fonts": [gFont("Regular", 22)],
"itemHeight": 40
}
</convert>
</widget>
<widget source="menu" render="Listbox" position="30,65" size="200,200" scrollbarMode="showNever" selectionDisabled="1" transparent="1">
<convert type="TemplatedMultiContent">
{"template": [ MultiContentEntryPixmapAlphaBlend(pos = (10,10), size = (180,180), png = 5) ],
"fonts": [gFont("Regular", 22)],
"itemHeight": 200
}
</convert>
</widget>
<widget source="menu" render="Listbox" position="0,280" size="250,200" zPosition="1" scrollbarMode="showNever" selectionDisabled="1" transparent="1">
<convert type="TemplatedMultiContent">
{"template": [
MultiContentEntryText(pos = (2, 2), size = (250, 200), flags = RT_HALIGN_CENTER|RT_VALIGN_CENTER|RT_WRAP, text = 4) ],
"fonts": [gFont("Regular", 22)],
"itemHeight": 200
}
</convert>
</widget>
</screen>