Beispiel #1
0
        /*
         * Return the skin behaviour struct for a given skin ID.
         */
        static menu_skin menu_find_skin(skin_id id)
        {
            switch (id)
            {
            case skin_id.SCROLL:
                return(menu_skin_scroll);

            case skin_id.COLUMNS:
                return(menu_skin_column);
            }

            return(null);
        }
Beispiel #2
0
        Region active;                  /* Subregion actually active for selection */


        /**
         * Initialise a menu, using the skin and iter functions specified.
         */
        public void Init(skin_id skin_id, menu_iter iter)
        {
            menu_skin skin = menu_find_skin(skin_id);

            Misc.assert(skin != null, "menu skin not found!");
            Misc.assert(iter != null, "menu iter not found!");

            /* Wipe the struct */
            //memset(menu, 0, sizeof *menu); //meh

            /* Menu-specific initialisation */
            row_funcs = iter;
            this.skin = skin;
            cursor    = 0;
        }
Beispiel #3
0
        int top; /* Position in list for partial display */

        #endregion Fields

        #region Constructors

        public Menu_Type(skin_id skin_id, menu_iter iter)
        {
            Init(skin_id, iter);
        }
Beispiel #4
0
        /*
         * Return the skin behaviour struct for a given skin ID.
         */
        static menu_skin menu_find_skin(skin_id id)
        {
            switch (id)
            {
                case skin_id.SCROLL:
                    return menu_skin_scroll;

                case skin_id.COLUMNS:
                    return menu_skin_column;
            }

            return null;
        }
Beispiel #5
0
        /**
         * Initialise a menu, using the skin and iter functions specified.
         */
        public void Init(skin_id skin_id, menu_iter iter)
        {
            menu_skin skin = menu_find_skin(skin_id);
            Misc.assert(skin != null, "menu skin not found!");
            Misc.assert(iter != null, "menu iter not found!");

            /* Wipe the struct */
            //memset(menu, 0, sizeof *menu); //meh

            /* Menu-specific initialisation */
            row_funcs = iter;
            this.skin = skin;
            cursor = 0;
        }
Beispiel #6
0
 public Menu_Type(skin_id skin_id, menu_iter iter)
 {
     Init(skin_id, iter);
 }