public void setItem(int index, string str, MeniuItem.GlitterType glit = MeniuItem.GlitterType.Mouse)
 {
     items[index].strName = str;
     items[index].setRect();
     items[index].glitter = glit;
 }
 public static void generateColor(MeniuItem it)
 {
     it.color = new Color(rnd.Next(255), rnd.Next(255), rnd.Next(255));
 }
        public MenuItemManager(int size, SpriteFont font, int windowHeight, int windowWidth)
        {
            items = new MeniuItem[size];

            for (int i = 0; i < size; i++)
                items[i] = new MeniuItem(font);

            int ratio = windowHeight / (size + 1) - 10;

            foreach (MeniuItem item in items)
            {
                item.height = ratio;
                item.width = windowWidth / 2;
                ratio += windowHeight / (size + 1);
                item.activated = true;
            }
        }