Streamline menu item logic (#17664)

This commit is contained in:
Scott Lahteine
2020-04-27 23:52:11 -05:00
committed by GitHub
parent f709c565a1
commit 4f003fc7a7
17 changed files with 303 additions and 251 deletions

View File

@@ -70,8 +70,10 @@ void menu_led_custom() {
void menu_led() {
START_MENU();
BACK_ITEM(MSG_MAIN);
bool led_on = leds.lights_on;
EDIT_ITEM(bool, MSG_LEDS, &led_on, leds.toggle);
MENU_ITEM_IF(1) {
bool led_on = leds.lights_on;
EDIT_ITEM(bool, MSG_LEDS, &led_on, leds.toggle);
}
ACTION_ITEM(MSG_SET_LEDS_DEFAULT, leds.set_default);
#if ENABLED(LED_COLOR_PRESETS)
SUBMENU(MSG_LED_PRESETS, menu_led_presets);