add basic mkv inline ssa/ass subtitle support
[enigma2.git] / lib / python / Screens / NumericalTextInputHelpDialog.py
1 from Screen import Screen
2 from Components.Label import Label
3
4 class NumericalTextInputHelpDialog(Screen):
5         def __init__(self, session, textinput):
6                 Screen.__init__(self, session)
7                 for x in range(1, 10):
8                         self["key%d" % x] = Label(text=textinput.mapping[x].encode("utf-8"))
9                 self.last_marked = 0
10
11         def update(self, textinput):
12                 if 1 <= self.last_marked <= 9:
13                         self["key%d" % self.last_marked].setMarkedPos(-1)
14                 if 1 <= textinput.lastKey <= 9:
15                         self["key%d" % textinput.lastKey].setMarkedPos(textinput.pos)
16                         self.last_marked = textinput.lastKey