1 from MenuList import MenuList
2 from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename
3 from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont
4 from Tools.LoadPixmap import LoadPixmap
6 def ChoiceEntryComponent(key, text):
9 res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 00, 800, 25, 0, RT_HALIGN_LEFT, "-"*200))
11 res.append((eListboxPythonMultiContent.TYPE_TEXT, 45, 00, 800, 25, 0, RT_HALIGN_LEFT, text[0]))
13 png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/key_" + key + ".png"))
15 res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 5, 0, 35, 25, png))
19 class ChoiceList(MenuList):
20 def __init__(self, list, selection = 0, enableWrapAround=False):
21 MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
22 self.l.setFont(0, gFont("Regular", 20))
23 self.l.setItemHeight(25)
24 self.selection = selection
26 def postWidgetCreate(self, instance):
27 MenuList.postWidgetCreate(self, instance)
28 self.moveToIndex(self.selection)