1 from HTMLComponent import *
2 from GUIComponent import *
3 from MenuList import MenuList
4 from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename
5 from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, eListbox, gFont, loadPNG
7 def ChoiceEntryComponent(key, text):
10 res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 00, 800, 25, 0, RT_HALIGN_LEFT, "-"*200))
12 res.append((eListboxPythonMultiContent.TYPE_TEXT, 32, 00, 800, 25, 0, RT_HALIGN_LEFT, text[0]))
14 png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "key_" + key + "-fs8.png"))
16 res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 0, 30, 20, png))
20 class ChoiceList(MenuList, HTMLComponent, GUIComponent):
21 def __init__(self, list, selection = 0):
22 GUIComponent.__init__(self)
23 self.l = eListboxPythonMultiContent()
26 self.l.setFont(0, gFont("Regular", 20))
27 self.l.setItemHeight(25)
28 self.selection = selection
32 def postWidgetCreate(self, instance):
33 instance.setContent(self.l)
34 self.moveToIndex(self.selection)