Hi all,
I'm trying to use advanced functions with ezMenu addItem. The only example I can find for it is in the M5ez.ccp file https://github.com/ropg/M5ez/blob/master/src/M5ez.cpp line 1248.
So in my main.ino file I have
void mainmenu_manage_boards() {
    // TODO
    prefs.begin("BOARDSTATUS");
    
    String idx;
    ezMenu savedBoards("Managing Boards");
    if (board_count < 1) {
        ez.msgBox("No Boards", "You have no saved Boards.", "OK");
        return;
    }
    for (uint8_t n = 1; n < board_count+1; n++) {
        idx = "NAME" + (String)n;
        String name = prefs.getString(idx.c_str(), "");
        savedBoards.addItem(name, NULL, _savedSelected);
    }
    savedBoards.txtSmall();
    savedBoards.buttons("up#Back#Forget##down#");
    savedBoards.run();
    
    prefs.end();
}
bool _savedSelected(ezMenu* callingMenu) {
  if (callingMenu->pickButton() == "Forget") {
    if (ez.msgBox("Forgetting board", "Are you sure you want | to forget board | " + callingMenu->pickName() + " ?", "Yes##No") == "Yes") {
      callingMenu->deleteItem(callingMenu->pick());
    }
  }
  return false;
}
On compile I get the following error
error: 'ezMenu' was not declared in this scope
 static bool _savedSelected(ezMenu* callingMenu) {
Any suggestions? If I do
savedBoards.addItem(name, NULL, NULL);
The menu renders fine.
Thanks in advance.