Line | |
---|
1 | from Screens.Screen import Screen |
---|
2 | from Components.ActionMap import ActionMap |
---|
3 | from Components.ScrollLabel import ScrollLabel |
---|
4 | |
---|
5 | class HelpScreen(Screen): |
---|
6 | |
---|
7 | def __init__(self, session, text): |
---|
8 | self.skin = '\n\t\t\t\t<screen position="80,80" size="e-160,e-160" title="Help" >\n\t\t\t\t\t<widget name="helptext" position="10,10" size="e-20,e-20" zPosition="10" font="Regular;21" transparent="1" halign="left" valign="top"/>\n\t\t\t\t</screen>' |
---|
9 | self.session = session |
---|
10 | Screen.__init__(self, session) |
---|
11 | self['actions'] = ActionMap(['WizardActions', 'DirectionActions'], {'ok': self.go, |
---|
12 | 'back': self.close, |
---|
13 | 'up': self.pageUp, |
---|
14 | 'down': self.pageDown}, -1) |
---|
15 | self['helptext'] = ScrollLabel() |
---|
16 | self['helptext'].setText(text) |
---|
17 | |
---|
18 | def go(self): |
---|
19 | self.close() |
---|
20 | |
---|
21 | def pageUp(self): |
---|
22 | self['helptext'].pageUp() |
---|
23 | |
---|
24 | def pageDown(self): |
---|
25 | self['helptext'].pageDown() |
---|
Note: See
TracBrowser
for help on using the repository browser.