MCPcopy Create free account
hub / github.com/BruceDevices/firmware / optionsMenu

Method optionsMenu

src/core/menu_items/ConfigMenu.cpp:17–55  ·  view source on GitHub ↗

** Function: optionsMenu ** Main Config menu entry point **********************************************************************/

Source from the content-addressed store, hash-verified

15** Main Config menu entry point
16**********************************************************************/
17void ConfigMenu::optionsMenu() {
18 returnToMenu = false;
19 while (true) {
20 // Check if we need to exit to Main Menu (e.g., DevMode disabled)
21 if (returnToMenu) {
22 returnToMenu = false; // Reset flag
23 return;
24 }
25
26 std::vector<Option> localOptions = {
27 {"Display & UI", [this]() { displayUIMenu(); }},
28#ifdef HAS_RGB_LED
29 {"LED Config", [this]() { ledMenu(); } },
30#endif
31 {"Audio Config", [this]() { audioMenu(); } },
32 {"System Config", [this]() { systemMenu(); } },
33 {"Power", [this]() { powerMenu(); } },
34 };
35
36#if !defined(LITE_VERSION)
37 if (!appStoreInstalled()) {
38 localOptions.push_back({"Install App Store", []() { installAppStoreJS(); }});
39 }
40#endif
41
42 if (bruceConfig.devMode) {
43 localOptions.push_back({"Dev Mode", [this]() { devMenu(); }});
44 }
45
46 localOptions.push_back({"About", showDeviceInfo});
47 localOptions.push_back({"Main Menu", []() {}});
48
49 int selected = loopOptions(localOptions, MENU_TYPE_SUBMENU, "Config");
50
51 // Exit to Main Menu only if user pressed Back
52 if (selected == -1 || selected == localOptions.size() - 1) { return; }
53 // Otherwise rebuild Config menu after submenu returns
54 }
55}
56
57/*********************************************************************
58** Function: displayUIMenu

Callers

nothing calls this directly

Calls 4

appStoreInstalledFunction · 0.85
installAppStoreJSFunction · 0.85
sizeMethod · 0.80
loopOptionsFunction · 0.50

Tested by

no test coverage detected