1 from Screen import Screen
2 from Components.Label import Label
4 class NumericalTextInputHelpDialog(Screen):
5 def __init__(self, session, textinput):
6 Screen.__init__(self, session)
7 self["help1"] = Label(text="<")
8 self["help2"] = Label(text=">")
9 for x in (1, 2, 3, 4, 5, 6, 7, 8, 9, 0):
10 self["key%d" % x] = Label(text=textinput.mapping[x].encode("utf-8"))
13 def update(self, textinput):
14 if 0 <= self.last_marked <= 9:
15 self["key%d" % self.last_marked].setMarkedPos(-1)
16 if 0 <= textinput.lastKey <= 9:
17 self["key%d" % textinput.lastKey].setMarkedPos(textinput.pos)
18 self.last_marked = textinput.lastKey