def __init__(self, session, title="", text=""): VirtualKeyBoard.__init__(self, session, title, text) NumericalTextInput.__init__(self, nextFunc=self.nextFunc) SkinResolutionHelper.__init__(self) self.configText = None if config.AdvancedMovieSelection.keyboard.value == "virtual": use = self.KEYBOARD elif config.AdvancedMovieSelection.keyboard.value == "numerical": use = self.NUM_KEYB else: use = self.BOTH if not use & self.KEYBOARD: # hide the keyboard self["list"].hide() # overwrite VirtualKeyBoard actions # make sure not overwrite any action of base class self["actions"] = ActionMap(["OkCancelActions", "WizardActions", "ColorActions", "KeyboardInputActions", "InputBoxActions", "InputAsciiActions"], { "ok": self.__ok, "cancel": self.__cancel, "left": self.dummy, "right": self.dummy, "up": self.dummy, "down": self.dummy, "red": self.__cancel, "green": self.__ok, "yellow": self.dummy, "deleteBackward": self.dummy, "back": self.dummy }, -2) if use & self.NUM_KEYB: self.timer = eTimer() self.timer.callback.append(self.timeout) self.configText = ConfigText("", False) if text: self.configText.text = text self.configText.marked_pos = len(text) self["config_actions"] = NumberActionMap(["SetupActions", "InputAsciiActions", "KeyboardInputActions"], { "1": self.keyNumberGlobal, "2": self.keyNumberGlobal, "3": self.keyNumberGlobal, "4": self.keyNumberGlobal, "5": self.keyNumberGlobal, "6": self.keyNumberGlobal, "7": self.keyNumberGlobal, "8": self.keyNumberGlobal, "9": self.keyNumberGlobal, "0": self.keyNumberGlobal }, -1) # to prevent left/right overriding the listbox self.onLayoutFinish.append(self.__onLayoutFinish) self.onClose.append(self.__onClose)
def __init__(self, session, textinput): NumericalTextInputHelpDialog.__init__(self, session, textinput) SkinResolutionHelper.__init__(self)