esp32_marauder/MenuFunctions.cpp
// Function to show all MenuNodes in a Menu
Function to show all MenuNodes in a Menu
Function to show all MenuNodes in a Menu
void MenuFunctions::showMenuList(Menu * menu, int layer)
{
  for (int i = 0; i < menu->list->size(); i++)
  {
    for (int x = 0; x < layer * 4; x++)
      Serial.print(" ");
    Serial.print("Node: ");
    Serial.println(menu->list->get(i).name);
  }
  Serial.println();
}
void MenuFunctions :: showMenuList ( Menu * menu , int layer ) { for ( int i = 0 ; i < menu -> list -> size ( ) ; i ++ ) { for ( int x = 0 ; x < layer * 4 ; x ++ ) Serial . print ( " " ) ; Serial . print ( " " ) ; Serial . println ( menu -> list -> get ( i ) . name ) ; } Serial . println ( ) ; }
Function to show all MenuNodes in a Menu
Function to show all MenuNodes in a Menu
// Iterate through all of the menu nodes in the menu // Depending on layer, indent // If the current menu node points to another menu, list that menu //if (menu->list->get(i).childMenu != NULL) //  showMenuList(menu->list->get(i).childMenu, layer+1);