Adding new menus

Hi everyone,


I've been fiddling around with this for a while but I'm struggling with adding a new menu.


I have a game in which the player can unlock new classes throughout the game and select them at will.


The classes unlocked are stored in the Game_Actor script and are accessible using two scripts, as below, where @classes_unlocked is an unbound array.


edit:  there is also a read property on classes_unlocked, so the full list is accessible with game_actor.classes_unlocked (I think?  If not I'll add a method).


  def check_classes(class_id)
    return @classes_unlocked.include?(class_id)
  end
  
  def add_class(class_id)
    @classes_unlocked.insert(-1,class_id)
  end




What I'd like is a menu option from the start menu, beneath items, which loops through this list and allows the user to select one.


Upon selecting one I'd like to call a common event to assign this class to my main character (already written).


I'm sure this is simpler than I'm making it out to be... in my head it's just using the same menu structure to loop through an array and print some text, but I can't quite get my head around how the menu is implemented.


Your help would be appreciated!

Original thread: https://forums.rpgmakerweb.com/threads/adding-new-menus.58088/