Exemple #1
0
        /*
         * Display a list of commands.
         */
        static bool cmd_menu(ref Command_List list, object selection_p)
        {
            Menu_Type menu;

            Menu_Type.menu_iter commands_menu = new Menu_Type.menu_iter(null, null, cmd_sub_entry, null, null);
            Region area = new Region(23, 4, 37, 13);

            ui_event evt;

            //Command_Info selection = selection_p as Command_Info;

            /* Set up the menu */
            menu = new Menu_Type(Menu_Type.skin_id.SCROLL, commands_menu);
            menu.priv(list.list.Length, list.list);
            menu.layout(area);

            /* Set up the screen */
            Utilities.screen_save();
            Utilities.window_make(21, 3, 62, 17);

            /* Select an entry */
            evt = menu.select(0, true);

            /* Load de screen */
            Utilities.screen_load();

            if (evt.type == ui_event_type.EVT_SELECT)
            {
                selection_p = list.list[menu.cursor];                 //This was originally selection as above
            }
            return(false);
        }
Exemple #2
0
        /*
         * Display a list of commands.
         */
        static bool cmd_menu(ref Command_List list, object selection_p)
        {
            Menu_Type menu;
            Menu_Type.menu_iter commands_menu = new Menu_Type.menu_iter( null, null, cmd_sub_entry, null, null );
            Region area = new Region(23, 4, 37, 13);

            ui_event evt;
            //Command_Info selection = selection_p as Command_Info;

            /* Set up the menu */
            menu = new Menu_Type(Menu_Type.skin_id.SCROLL, commands_menu);
            menu.priv(list.list.Length, list.list);
            menu.layout(area);

            /* Set up the screen */
            Utilities.screen_save();
            Utilities.window_make(21, 3, 62, 17);

            /* Select an entry */
            evt = menu.select(0, true);

            /* Load de screen */
            Utilities.screen_load();

            if (evt.type == ui_event_type.EVT_SELECT)
                selection_p = list.list[menu.cursor]; //This was originally selection as above

            return false;
        }