Beispiel #1
0
        public static char lookup_key(Command_Code lookup_cmd)
        {
            for (int i = 0; i < converted_list.Length; i++)
            {
                Command_Info cmd = converted_list[i];

                if (cmd != null && cmd.cmd == lookup_cmd)
                {
                    return(cmd.key);
                }
            }

            return('\0');
        }
Beispiel #2
0
        /*
         * Display a list of command types, allowing the user to select one.
         */
        static char action_menu_choose()
        {
            Region area = new Region(21, 5, 37, 6);

            Command_Info chosen_command = new Command_Info();

            if (Command.command_menu == null)
            {
                Command.command_menu = new Menu_Type(Menu_Type.skin_id.SCROLL, Command.command_menu_iter);
            }

            Command.command_menu.priv(Command_List.all.Length - 1, chosen_command);
            Command.command_menu.layout(area);

            /* Set up the screen */
            Utilities.screen_save();
            Utilities.window_make(19, 4, 58, 11);

            Command.command_menu.select(0, true);
            Utilities.screen_load();

            return(chosen_command.key);
        }
Beispiel #3
0
 public Command_List(string name, Command_Info[] list)
 {
     this.name = name;
     this.list = list;
 }