Menu help

So i'm looking to write my own menu system for use with my rotary encoder. I came across a sketch that uses a menu system I like. But i'm unsure how it works. If someone could point me in the right direction as i've tried google with no results or give me a rundown of the structure i'd greatly appreciate it. Here is part of the code i'm looking at and will post the sketch too if it fits.

// the first column represents the number of menu transitions available in the nth menu, and the 
// second column represents the index of the present menu when going through the menu system
byte menu[7][2] = {
  {
    3,0                                                                                            }
  , {
    16,0                                                                                            }
  , {
    6,0                                                                                            }
  , {
    5,0                                                                                            }
  ,{
    1,0                                                                                            }
  ,{
    0,0                                                                                }
  ,{ 
    2,0                                                                         }
};

But i'm unsure how it works.

the first column represents the number of menu transitions available in the nth menu, and the second column represents the index of the present menu when going through the menu system

Ok....so then in the first menu there are 3 sub-menus then and 16 in the 2nd menu.....am I getting this right? Thanks for the help.

I've no idea, bit then, I can't see the code.

Since the sketch is too large i've uploaded it to my old git acct. you can view it @ https://github.com/SaltyDog-Aquariums/Temp/blob/master/storm2.ino

Thank you for the input and help.