MCPcopy Create free account
hub / github.com/Stewmath/GameYob / setMenuDefaults

Function setMenuDefaults

arm9/source/console.cpp:441–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439const int numMenus = sizeof(menuList)/sizeof(ConsoleSubMenu);
440
441void setMenuDefaults() {
442 for (int i=0; i<numMenus; i++) {
443 for (int j=0; j<menuList[i].numOptions; j++) {
444 menuList[i].options[j].selection = menuList[i].options[j].defaultSelection;
445 menuList[i].options[j].enabled = true;
446 if (menuList[i].options[j].numValues != 0) {
447 menuList[i].options[j].function(menuList[i].options[j].defaultSelection);
448 }
449 }
450 }
451
452 menuConsole = (PrintConsole*)malloc(sizeof(PrintConsole));
453 memcpy(menuConsole, consoleGetDefault(), sizeof(PrintConsole));
454}
455
456void displayMenu() {
457 menuOn = true;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected