MCPcopy Create free account
hub / github.com/Blueforcer/awtrix3 / selectButtonLong

Method selectButtonLong

src/MenuManager.cpp:404–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404void MenuManager_::selectButtonLong()
405{
406
407 if (inMenu)
408 {
409 if (GAME_ACTIVE)
410 {
411 currentState = MainMenu;
412 inMenu = false;
413 GAME_ACTIVE = false;
414 return;
415 }
416 switch (currentState)
417 {
418 case BrightnessMenu:
419 // BRIGHTNESS = map(BRIGHTNESS_PERCENT, 0, 100, 0, 255);
420 saveSettings();
421 break;
422 case ColorMenu:
423 TEXTCOLOR_888 = textColors[currentColor];
424 saveSettings();
425 break;
426 case MainMenu:
427 inMenu = false;
428 break;
429 case SwitchMenu:
430 DisplayManager.setAutoTransition(AUTO_TRANSITION);
431 saveSettings();
432 break;
433 case TspeedMenu:
434 case AppTimeMenu:
435 DisplayManager.applyAllSettings();
436 saveSettings();
437 break;
438 case TimeFormatMenu:
439 TIME_FORMAT = timeFormat[timeFormatIndex];
440 saveSettings();
441 break;
442 case DateFormatMenu:
443 DATE_FORMAT = dateFormat[dateFormatIndex];
444 saveSettings();
445 case WeekdayMenu:
446 case SoundMenu:
447 case TempMenu:
448 saveSettings();
449 break;
450 case Appmenu:
451 DisplayManager.loadNativeApps();
452 saveSettings();
453 break;
454 case VolumeMenu:
455 PeripheryManager.setVolume(SOUND_VOLUME);
456 saveSettings();
457 break;
458 default:
459 break;
460 }
461 currentState = MainMenu;

Callers 1

Calls 5

saveSettingsFunction · 0.85
setAutoTransitionMethod · 0.80
applyAllSettingsMethod · 0.80
loadNativeAppsMethod · 0.80
setVolumeMethod · 0.45

Tested by

no test coverage detected