New Arduino library: MenuSystem

Hi jonblack.

Is me again, I have a question:
Is there a way to identify a selection other that by name.
I want my serialHandler to react different if I'm in the menu, or if I'm in a selection. I want to make that, for example, when I select Level1 Item1 my serialHandler reacts accordingly and set a variable value using the same comands (the plan if in the future swap serial handler with a button handler). Any tips how to approach?

One idea that I have is to modify the lib so add an id to the MenuComponent

class MenuComponent
{
public:
    MenuComponent(char* name, int id);

    void set_name(char* name);
    char* get_name() const;
    int get_Id() const;

    virtual MenuComponent* select() = 0;

protected:
    char* _name;
    byte _id;
};

But this way it will be responsibility of the user to put the unique id of the component

any other idea?