From e000f4fe54c2172217a82da967d8c8b499cd9890 Mon Sep 17 00:00:00 2001 From: Jason P Date: Sun, 29 Jun 2025 18:43:55 -0500 Subject: [PATCH] Screen Color Picker changes, defined Yellow as a Color. --- src/graphics/draw/MenuHandler.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/graphics/draw/MenuHandler.cpp b/src/graphics/draw/MenuHandler.cpp index b8c259e57..5c4fb49c0 100644 --- a/src/graphics/draw/MenuHandler.cpp +++ b/src/graphics/draw/MenuHandler.cpp @@ -487,25 +487,28 @@ void menuHandler::switchToMUIMenu() void menuHandler::TFTColorPickerMenu() { - static const char *optionsArray[] = {"Back", "Default", "Meshtastic Green", "Red", "Orange", "Purple", "Teal"}; - screen->showOverlayBanner("Current Screen Color?", 30000, optionsArray, 7, [](int selected) -> void { + static const char *optionsArray[] = {"Back", "Default", "Meshtastic Green", "Yellow", "Red", "Orange", "Purple", "Teal"}; + screen->showOverlayBanner("Select Screen Color", 30000, optionsArray, 8, [](int selected) -> void { if (selected == 1) { - LOG_INFO("Setting color to soft yellow"); - TFT_MESH = COLOR565(255, 255, 128); + LOG_INFO("Setting color to system default or defined variant"); + // Insert unset protobuf code here } else if (selected == 2) { LOG_INFO("Setting color to Meshtastic Green"); TFT_MESH = COLOR565(0x67, 0xEA, 0x94); } else if (selected == 3) { + LOG_INFO("Setting color to Yellow"); + TFT_MESH = COLOR565(255, 255, 128); + } else if (selected == 4) { LOG_INFO("Setting color to Red"); TFT_MESH = COLOR565(255, 64, 64); - } else if (selected == 4) { - LOG_INFO("Setting color to orange"); - TFT_MESH = COLOR565(255, 165, 0); } else if (selected == 5) { - LOG_INFO("Setting color to purple"); - TFT_MESH = COLOR565(192, 128, 192); + LOG_INFO("Setting color to Orange"); + TFT_MESH = COLOR565(255, 165, 0); } else if (selected == 6) { - LOG_INFO("Setting color to teal"); + LOG_INFO("Setting color to Purple"); + TFT_MESH = COLOR565(204, 153, 255); + } else if (selected == 7) { + LOG_INFO("Setting color to Teal"); TFT_MESH = COLOR565(64, 224, 208); } @@ -514,6 +517,8 @@ void menuHandler::TFTColorPickerMenu() static_cast(screen->getDisplayDevice())->setRGB(TFT_MESH); screen->setFrames(graphics::Screen::FOCUS_SYSTEM); + // I think we need a saveToDisk to commit a protobuf change? + // nodeDB->saveToDisk(SEGMENT_CONFIG); } #endif });