def append_char(self, char): submenu = self.pane.shortcuts.get(char, None) if submenu is not None: self.change_menu_action(submenu) if submenu.children or submenu.explaining_text: self.pane.enter_branch(submenu) else: messages.receive(Message(self.currentAction, self.currentComplement))
def handle_arguments(): no_commands = len(argv) > 1 and argv[1] == "noc" if not no_commands: commands = read_command_file() for command in commands: # Remove the \n and make upper caps command = command[:-1].upper() messages.receive(message_parser(command))
def enter(self): # Call to global. We'd like to avoid that. messages.clean() messages.receive(message_parser(self.content.upper())) self.content = ""
def escape(self): if self.pane.can_go_back(): self.pane.go_back() self.change_menu_action(self.pane.current_branch) else: messages.receive(Message(Message.QUIT))
def sendAreaMessage(self): if self.currentAction is not Message.VIEW: for x in range(self.selection.x, self.selection.x2 + 1): for y in range(self.selection.y, self.selection.y2 + 1): messages.receive(Message(self.currentAction, (x,y)))