2 from Screens.Screen import Screen
3 from Screens.MessageBox import MessageBox
4 from Components.ActionMap import NumberActionMap
5 from Components.Label import Label
6 from Components.Input import Input
7 from Components.GUIComponent import *
8 from Plugins.Plugin import PluginDescriptor
14 <screen position="100,100" size="550,400" title="Test" >
15 <widget name="text" position="0,0" size="550,25" font="Regular;20" />
18 def __init__(self, session, args = None):
20 Screen.__init__(self, session)
22 self["text"] = Input("1234", maxSize=True, type=Input.NUMBER)
24 self["actions"] = NumberActionMap(["WizardActions", "InputActions"],
29 "right": self.keyRight,
30 "1": self.keyNumberGlobal,
31 "2": self.keyNumberGlobal,
32 "3": self.keyNumberGlobal,
33 "4": self.keyNumberGlobal,
34 "5": self.keyNumberGlobal,
35 "6": self.keyNumberGlobal,
36 "7": self.keyNumberGlobal,
37 "8": self.keyNumberGlobal,
38 "9": self.keyNumberGlobal,
39 "0": self.keyNumberGlobal
48 def keyNumberGlobal(self, number):
49 print "pressed", number
50 self["text"].number(number)
56 return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)