mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-09 15:14:45 +00:00
Screen Color Picker changes, defined Yellow as a Color.
This commit is contained in:
parent
ac7182cdf8
commit
e000f4fe54
@ -487,25 +487,28 @@ void menuHandler::switchToMUIMenu()
|
|||||||
|
|
||||||
void menuHandler::TFTColorPickerMenu()
|
void menuHandler::TFTColorPickerMenu()
|
||||||
{
|
{
|
||||||
static const char *optionsArray[] = {"Back", "Default", "Meshtastic Green", "Red", "Orange", "Purple", "Teal"};
|
static const char *optionsArray[] = {"Back", "Default", "Meshtastic Green", "Yellow", "Red", "Orange", "Purple", "Teal"};
|
||||||
screen->showOverlayBanner("Current Screen Color?", 30000, optionsArray, 7, [](int selected) -> void {
|
screen->showOverlayBanner("Select Screen Color", 30000, optionsArray, 8, [](int selected) -> void {
|
||||||
if (selected == 1) {
|
if (selected == 1) {
|
||||||
LOG_INFO("Setting color to soft yellow");
|
LOG_INFO("Setting color to system default or defined variant");
|
||||||
TFT_MESH = COLOR565(255, 255, 128);
|
// Insert unset protobuf code here
|
||||||
} else if (selected == 2) {
|
} else if (selected == 2) {
|
||||||
LOG_INFO("Setting color to Meshtastic Green");
|
LOG_INFO("Setting color to Meshtastic Green");
|
||||||
TFT_MESH = COLOR565(0x67, 0xEA, 0x94);
|
TFT_MESH = COLOR565(0x67, 0xEA, 0x94);
|
||||||
} else if (selected == 3) {
|
} 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");
|
LOG_INFO("Setting color to Red");
|
||||||
TFT_MESH = COLOR565(255, 64, 64);
|
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) {
|
} else if (selected == 5) {
|
||||||
LOG_INFO("Setting color to purple");
|
LOG_INFO("Setting color to Orange");
|
||||||
TFT_MESH = COLOR565(192, 128, 192);
|
TFT_MESH = COLOR565(255, 165, 0);
|
||||||
} else if (selected == 6) {
|
} 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);
|
TFT_MESH = COLOR565(64, 224, 208);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -514,6 +517,8 @@ void menuHandler::TFTColorPickerMenu()
|
|||||||
|
|
||||||
static_cast<ST7789Spi *>(screen->getDisplayDevice())->setRGB(TFT_MESH);
|
static_cast<ST7789Spi *>(screen->getDisplayDevice())->setRGB(TFT_MESH);
|
||||||
screen->setFrames(graphics::Screen::FOCUS_SYSTEM);
|
screen->setFrames(graphics::Screen::FOCUS_SYSTEM);
|
||||||
|
// I think we need a saveToDisk to commit a protobuf change?
|
||||||
|
// nodeDB->saveToDisk(SEGMENT_CONFIG);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user