Exemplo n.º 1
0
 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))
Exemplo n.º 2
0
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))
Exemplo n.º 3
0
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))
Exemplo n.º 4
0
 def enter(self):
     # Call to global. We'd like to avoid that.
     messages.clean()
     messages.receive(message_parser(self.content.upper()))
     self.content = ""
Exemplo n.º 5
0
 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))
Exemplo n.º 6
0
 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)))